/tmp/ディレクトリ下は、テンポラリ領域としてファイルの解凍や一時的に利用するファイルが書き出される。常時稼働させている状態でしばらくの日数を経て/tmp/下を見ると、以前あったファイルが無くなっている場合がある。これはどのようなタイミングで削除されたのだろうか? これは、1日1回実行されるcronスケジュールで実行されるスクリプト「tmpwatch」から実行されるコマンド「tmpwatch」によって判断されている。 # file /usr/sbin/tmpwatch /usr/sbin/tmpwatch: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped # ls /etc/cron.daily/ 00-logwatch l
![Linux Tips「/tmp/ディレクトリ下のファイルはいつ削除される?」](https://cdn-ak-scissors.b.st-hatena.com/image/square/128e59e5799335c8339fd6d17afb57fbfc502b40/height=288;version=1;width=512/https%3A%2F%2Fimage.itmedia.co.jp%2Fenterprise%2Farticles%2F0212%2F11%2Fcover_news005.jpg)