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
精彩评论