I sometimes need to see only the files created or modified today in a directory. On a Linux system, you can pipe the output of the ls command into the grep command looking for just today's date in the input to the grep command as shown below:
$ ls -al --time-style=+%D ~/Documents/*.zip | grep $(date +%D) -rw-r--r--. 1 joe joe 269338 01/12/18 /home/joe/Documents/gloves.zip $
You can specify how the date is displayed with +format
where format is a particular format in which you want the date
displayed - see
Formatting the output from the date command on a Linux system. If you
use +%D
, the date will be displayed as m/d/y
, i.e.,
month/day/year, e.g. 01/12/18 for January 12, 2018. By then using the
grep command to search for that value, you can limit the displayed files
to only those created or modified today.
[ More Info ]