//View Tip #824
Similar Tips
» Get your IP address
» Get latest stable version of the Linux kernel
» Replace expr by other recursively
» Remove DS_Store files from shared folders
» Sort a file by line length

 

Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
Use this command to list files that have been updated today in the current directory.

ls -l|awk '/'$(date +%Y-%m-%d)'/{print $NF}'

This method is an alternative to using find with the mtime option (see tip 199) and can be a more intuitive way of locating files modified on a specific date, for example:

ls -l|awk '/2009-04-28/{print $NF}'

'ls --full-time' can also be used and the matching criteria modified to find files modified in a particular month, hour, day, between 09:00 and 17:00 each day or anything else as required.


View Comments »




Comments 

Add your comment

Comments are currently disabled
Mario
Ok, but why don't you simply use find command:

find . -ctime 0

or

find . -mtime 0

which do pretty much the same things (i.e. find files that have been created/modified in the last 24 hours)?
Posted 2009-06-02 13:39:52

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit