≡ Menu

Linux / UNIX: Displaying Today’s Files Only

How do I list all files created today only using shell command under UNIX or Linux operating systems?

You can use the find command as follows to list today’s file in current directory only (i.e. no subdirs):
find -maxdepth 1 -type f -mtime -1
Sample outputs:


In this example, find todays directories only
find -maxdepth 1 -type d -mtime -1
Another old but outdated ls command hack is as follows:
ls -al --time-style=+%D | grep $(date +%D)
See the find command man page for more details:
man find

Share this tutorial on:

Like this? Follow us on Twitter OR support us by using Patreon

{ 15 comments… add one }
  • Manichattan April 28, 2010, 2:20 pm

    Hi, I love the tips and tutorials that you provide.
    Technically, the commands above will find files that were modified in
    the last day, not created.

  • Dennis April 28, 2010, 10:55 pm

    This should give you files modified today (i.e. not last 24hrs)

    find -maxdepth 1 -type f -daystart -mtime -1

    Measure times (for -amin, -atime, -cmin, -ctime, -mmin, and -mtime) from the beginning of today rather than from 24 hours ago. This option only affects tests which appear later on the command line.

    • muthu raman May 4, 2011, 1:25 pm

      gr8 !!! thx dude… i was searching for this ‘daystart’ thing !!!!

    • Pankaj May 17, 2011, 12:45 pm

      GREAT !!!!!!!!!!!!!!!

    • Donald Klopper June 24, 2015, 8:32 am

      Nice one thanks.

      I now use it with:
      less `find -maxdepth 1 -type f -daystart -mtime -1`

      which opens the latest file in less, useful for log files where only one file will have “today’s” timestamp.

  • Phil Dufault April 29, 2010, 5:33 pm

    There is no present way to track in Unix/Linux when a file was created. Only when it was last modified. There is support for tracking this now in ext4, but hasn’t been added as it’s not standard.

  • Julie July 14, 2011, 4:11 pm

    great ! This is helpful indeed .

  • Ramesh October 15, 2012, 5:02 pm

    Hi ,

    This was helpful. But can anyone help me for a command which will display files in descending order of the timestamp or dates. Not able to figure it out.

    Help on this will be great . Thanks in advance !


    • Phil Dufault October 15, 2012, 6:25 pm

      you mean: ls -lt

  • Sweta October 9, 2014, 7:07 pm

    hi, I want to get only filenames that are modified today.
    i tried
    ls -alog temp*.txt –time-style=+%D | grep $(date +%D). this gives me permission,size,date and filename. pls suggest how can i get only the filename.

  • Sweta October 9, 2014, 7:11 pm

    Hi, i got the solution..Thanks

    • Gagan December 3, 2014, 2:04 pm

      Hi Sweta,
      Please let me know the command you used for this. I have same requirement as you were looking.


  • Phil Dufault December 4, 2014, 12:17 am

    This will do it, it’s not very tidy though:
    ls -Alog * –time-style=+%D | grep $(date +%D) | awk ‘{print $NF}’

  • SATYA May 23, 2016, 4:10 am

    please let me know the command, filter out the file those who are genrate after 6.30AM

  • Mayank January 14, 2017, 7:01 pm

    How to see only the files which are created today between 10 a.m to 5

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: