Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个关于 shell 命令的问题
rm -rf
我正在尝试查找例如 14 天未访问的文件并且我想将其删除,但是如何添加到我的命令中以便我可以找到并删除此类文件。
我正在使用 CentOS 6
只是在那里抛出一些大方向:
我会做一个循环。如果文件超过 14 天 rm -rf end-if
对于文件的日期,您可以使用当前日期,减去 14 天......我会使用 UNIX 时间。
但是,是的,正如 devnull 回答的那样,您必须进行更多搜索。谷歌是你的朋友。StackOverflow 中可能有很多东西,而 google 中可能还有更多。