LoginSignup
3
1

More than 3 years have passed since last update.

メモ:tmpwatch使わずに/tmp下を定期削除

Posted at

この記事は

  • 完全なる個人メモです

メモ

  • /tmpの下にゴミが溜まってくるので日付が古くなったものは自動削除したい!
  • ふつうはtmpwatchを使うんだけど、alpineとかdocker使い捨て前提みたいなOSには存在しない!
  • で、なんとfindコマンドで実行できることがわかったのでメモっておく
find /tmp -mtime +7 ! -type d -delete

終わりに

  • find無敵だな
3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1