Ran*_*ngh 1 unix shell find unix-timestamp
以下命令它找到了超过60分钟但在子目录中的所有文件.
find . -type f -mmin +60 -print
Run Code Online (Sandbox Code Playgroud)
我们如何限制它只在给定目录中查找文件?
我在sub direcotries中有归档文件夹,其中包含导致问题的旧文件.
提前致谢 :)
使用-maxdepth 1参数将find结果限制为当前目录.
所以你的全部命令就是 find . -type f -mmin +60 -maxdepth 1 -print