如何删除超过1天的文件
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何删除超过1天的文件相关的知识,希望对你有一定的参考价值。
A one-liner to remove any temporary files modified over one day ago. Removes files from /tmp/Run without the '-exec rm {} ;' part to check that it is matching the right set of files - this can be dangerous if run by root!
If you want to remove files modified today, change +1 to -1
This can be useful to add into crontab though
find /tmp/ -type f -mtime +1 -exec rm {} ;
以上是关于如何删除超过1天的文件的主要内容,如果未能解决你的问题,请参考以下文章