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:
./.gtk-bookmarks ./.ICEauthority ./.bash_history ./.xsession-errors.old ./.xsession-errors ./.recently-used.xbel ./.dmrc
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
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop



![Linux Copy File Command [ cp Command Examples ]](http://s0.cyberciti.org/images/rp/1/5.jpg)







{ 7 comments… read them below or add one }
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.
Thanks,
-manichattan
This should give you files modified today (i.e. not last 24hrs)
find -maxdepth 1 -type f -daystart -mtime -1
-daystart
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.
gr8 !!! thx dude… i was searching for this ‘daystart’ thing !!!!
GREAT !!!!!!!!!!!!!!!
-daystart
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.
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 !
Regards,
Ramesh
you mean: ls -lt