べすとえふぉーと

プログラミング等のノート 

2017-01-01から1年間の記事一覧

wgetで403回避

403が出る場合はユーザーエージェント指定 空でもOK wget -U "" -i url.txt

cronの例

分指定 10分毎にdo_something */10 * * * * do_something > /dev/null 2>&1

Postgresで全ダンプ

hでホスト、-pでポート、-Uでユーザ名 pg_dumpall -h localhost -p 5432 -U postgres > dump.dat

ディレクトリ下のファイル数・容量を調べるコマンド

ファイル数のカウント ls -l $dir | wc -lディレクトリの容量 du -h $dir

wget オプションのメモ

一行ずつ読んで取得 -i url.txtすでに存在する場合はスキップ -nc証明書エラー対策 --no-check-certificateタイムアウトの秒数 --timeout=10まとめ wget -i url.txt -nc --no-check-certificate --timeout=10 追記 w でウェイト -w 1