开发者

Is there a bash command to do this?

I开发者_如何学编程 want to know if new files/directories have been created in a specific directory A since a fixed date time.

Is there a bash command to do this?


No, since creation dates aren't stored on most *nix filesystems. Try find with the -amin, -atime, -mmin, or -mtime predicates.


$ man find

http://unixhelp.ed.ac.uk/CGI/man-cgi?find


use the touch command to create a dummy file. eg touch .dummy. then use the find command with -newer option to check for new files. eg

find /path -newer .dummy
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜