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