查找命令查找在特定日期之后在Linux/Cygwin下创建的目录 [英] Find command find directories that were created after a certain date under Linux/Cygwin
本文介绍了查找命令查找在特定日期之后在Linux/Cygwin下创建的目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用find命令查找这些目录:
I want to use the find command to find these directories:
Access: 2013-12-13 10:59:46.190886900 -0500
Modify: 2013-12-03 07:04:02.995890600 -0500
Change: 2013-12-03 07:04:02.995890600 -0500
Birth: 2013-12-02 07:04:02.000000000 -0500 (I want a time after '12-03')
这是我运行的命令,但它仍然列出了较旧的目录:
This is the command I ran but it still lists older directories:
find . -type d -newerBt '2013-12-03 00:00:00' -exec du -h {} \;
如何修改此行以查找在该日期之后创建的目录?-newerct和-newerBt有什么区别.我想我要生日.
How can I modify this line to find the directories created after that date? What is the difference between -newerct and -newerBt. I think I want the birth date.
注意:我正在用最新的cygwin来运行它.
Note: I am running this with the latest cygwin.
推荐答案
您可以改用 stat :
find . -type d -exec bash -c '(( $(stat -c %W "{}") > $(date +%s -d '2013-12-03') )) && du -h "{}"' \;
这篇关于查找命令查找在特定日期之后在Linux/Cygwin下创建的目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文