破損したsqliteファイルの修復
ファイルはバックアップしてある前提
#sqlite3 database.db .dump | sqlite3 database_new.db #rm database.db #mv database_new.db database.db
scp ポート指定してファイルを取得
- Pでポート指定
scp -P $PORT loginusername@host:/home/loginusername/somefile.txt
Windows10の容量削減
いずれも管理者権限で実行
(1)OSバイナリ圧縮
compact /compactos:always
元に戻す場合
compact /compactos:none
(2)ハイバネートオフ
powercfg -hibernate off
元に戻す場合
powercfg -hibernate off
(3)アップデートキャッシュ削除
c:\Windows\SoftwareDistribution\Download
SQLiteでDBのマージ
マージ先のDBを開いてる状態で実行
sqlite> attach database 'old_db.db' as old1; sqlite> begin; sqlite> insert into main.test_table(col1,col2,col3) select col1,col2,col3 from old1.test_table; sqlite> commit;
'old_db.db'はマージ元のファイル
Fedora28 xfce
sudo dnf groupinstall -y "Xfce Desktop"
urlのテキストをxargsでwgetに渡す
- nc以降はオプション
cat url.txt | xargs -I % wget % -nc --no-check-certificate --timeout=10
Raspberry Piの解像度設定(Raspbian Jessie)
ファイルは/boot/config.txt
disable_overscan=1をコメントアウト
disable_overscan=1
以下のように設定
overscan_left=24 overscan_right=24 overscan_top=10 overscan_bottom=24 framebuffer_width=1280 framebuffer_height=800