タグ

関連タグで絞り込む (2)

タグの絞り込みを解除

Tipsとnoteに関するkyuxyuのブックマーク (3)

  • n日前より古いファイルを消す - moratorium

    n日前より古いファイルを消す 2009-05-12 (Tue) 7:51 Unix バックアップスクリプトを書く時にいつも忘れるのでメモ。 DATE=`date -d '7 days ago' +%y%m%d0000` echo $DATE echo >temp.file touch -t $DATE temp.file find . ! -newer temp.file -print | xargs rm -f rm temp.file findコマンドの-newerを使用しています (お好みで-anewer, -cnewerなど)。 P.S. chunさんよりzshのextended_globを覚えろとの指令が飛びました。 setopt extended_glob; ls *(^m-7) -ld Zzappers Best of ZSH Tips おー。 P.S.2 Higepon

  • /procなどの情報ファイルを定期的に見るには

    ► 2014 (16) ► 5月 (2) ► 4月 (3) ► 3月 (4) ► 2月 (1) ► 1月 (6) ► 2013 (73) ► 12月 (3) ► 11月 (2) ► 10月 (2) ► 9月 (2) ► 8月 (7) ► 7月 (7) ► 6月 (4) ► 5月 (3) ► 4月 (13) ► 3月 (11) ► 2月 (3) ► 1月 (16) ► 2012 (71) ► 12月 (5) ► 11月 (6) ► 10月 (6) ► 9月 (6) ► 8月 (3) ► 7月 (5) ► 6月 (10) ► 5月 (7) ► 4月 (4) ► 3月 (8) ► 2月 (2) ► 1月 (9) ► 2011 (83) ► 12月 (5) ► 11月 (2) ► 10月 (2) ► 9月 (1) ► 8月 (10) ► 7月 (4) ► 6月 (2) ► 5月 (21) ► 4月

  • 最近知ったLinux/UNIXの小技 - harry’s memorandum

    最近知って結構ショックを受けた。 touch hoge.txt と似たような機能。*1 $ > hoge.txt $ ls -l hoge.txt -rw-r--r-- 1 root root 0 Jul 10 03:15 hoge.txt lessでtail -f ができる。 $ sudo less +F /var/log/messages SSHでリモートサーバに対して色々 リモート先のファイルをsortして比較。パスフレーズなしにするか、ssh-agentを使用するかしてください。 $ diff <(sort /home/user/.bashrc) <(ssh user@hostname "sort /home/user/.bashrc") リモートサーバのファイルを編集 $ vim scp://user@hostname//home/user/.bashrc sambaのコマンドで

    最近知ったLinux/UNIXの小技 - harry’s memorandum
  • 1