tags:

views:

54

answers:

3

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?

+1  A: 

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

Ignacio Vazquez-Abrams
A: 
$ man find

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

codeape
A: 

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
ghostdog74
And you can specify the time with the 'touch' command: `touch -t 201004041659.32` for 2010-04-04 16:59:32.
Jonathan Leffler
Strictly, this gives you files modified since the reference time of the file - not necessarily those which were created. That may be a good enough approximation.
Jonathan Leffler