tmpwatch(temporary watch)
tmpwatch(temporary watch)功能说明:删除暂存文件。
语 法:tmpwatch [-afqv][--test][超期时间][目录...]
补充说明:执行tmpwatch指令可删除不必要的暂存文件,您可以设置文件超期时间,单位以小时计算。
参 数:
-a或--all 删除任何类型的文件。
-f或--force 强制删除文件或目录,其效果类似rm指令的"-f"参数。
-q或--quiet 不显示指令执行过程。
-v或--verbose 详细显示指令执行过程。
-test 仅作测试,并不真的删除文件或目录。
tmpwatch
tmpwatch [options] hours directory
System administration command. Recursively remove regular files and directories in directory with access times older than hours. Specify the directory as an absolute path. This command is usually invoked by cron to remove old files in the /tmp directory.
Options
Remove all file types.
Make decision on last inode change time for files and modification time for directories instead of access time
Do not remove directories.
Force removal of read-only files (similar to rm -f).
Make decision on last modification time instead of access time.
Before deleting, attempt to use fuser to see if a file is in use.
Verbosely test command, but don't actually remove files.
Make decision on access time. (This is the default.)
Print more details. Use two times to further increase the detail of the output.
Skip the specified path, the absolute path of a directory or file.