手動での操作

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)

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny

タイトルとURLをコピーしました