4

Tip #824   List only the files that have been updated today.

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.