Tips&Tricks

How to show today’s files only in Linux

terminal

ls command has many abilities. Mostly we use it to show a list of files in current directory. We can even define style for output.

For example

ls -al --time-style=+%D

– shows to us same ls -la list of files, but time column will be in different format.

So, if we grep it by time in this format… We’ll get only files, which modified this date.

ls -al --time-style=+%D | grep $(date +%D)

Works on GNU/Linux, but doesn’t on MacOS.