David Kirk wrote:
How do I list files created in a directory on a specified date?
You can use the find command with -exec ls {} \;
Unfortunately you can't search on when a file was created. Your options are:
-atime - when the file was last accessed -ctime - when the file's status was last changed -mtime - when the file's contents were last changed
So, you could use eg:
find /home/ross -ctime 1 -exec ls {} \;
to see what files ctime have changed in the last 24 hours.
'man find' to get more information.
...nearly!
find $dir -ctime -1 | xargs ls -ld | more
is faster ( xargs parcels up the files to ls, exec calls it anew every time ), and the -1 ( as opposed to 1 ) will find files less than 24 hours old ( as opposed to exactly 24 hours old ).
Cheers,
Steve mutter mutter gmail mutter mutter (:
