Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
crontabにtmpwatchを登録して/tmpディレクトリの更新日時やアクセス時刻が一時間以上経った古いファイルを削除する方法
# tmpwatch
* * * * * /usr/sbin/tmpwatch -umc -x /tmp/.X11-unix -x /tmp/.XIM-unix -x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix -X '/tmp/hsperfdata_*' -X '/tmp/.hdb*lock' -X '/tmp/.sapstartsrv*.log' 1 /tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment