bash 搜索 x 天未访问的文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15765640/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 05:04:16 来源:igfitidea点击:
search for files not accessed for x days
提问by rabotalius
How can I find files in Linux that were notaccessed for X days?
如何在 Linux 中找到X 天未访问的文件?
I found that command, but it will show files that were viewed for the last x days:
我找到了该命令,但它会显示过去 x 天查看过的文件:
$ find /home/you -iname "*.pdf" -atime -60 -type -f
回答by dogbane
Use -atime +60to see files that have not been accessed within the last 60 days:
使用-atime +60地看到,没有被中在过去60天内访问的文件:
find /home/you -iname "*.pdf" -atime +60 -type f

