手動での操作

2週間以上経過したファイルを抽出

find /path/to/find -maxdepth 1 -mtime +13 -type 4 | sort | less

抽出したファイルを削除
ディレクトリが含まれる場合は rmコマンドの-fオプションが必要。

find /path/to/find -maxdepth 1 -mtime +13 -type 4 | xargs -f

差分バックアップ

 

rsync -avh --link-dest=/path/to/last_backup /path/to/source_directory /path/to/destination_directory/backup-(date +%Y%m%d-%H%M%S)
タイトルとURLをコピーしました