There are two ways to list files in given directory modified after given date of the current year. The latest version of GNU/find command use the following syntax:
Syntax
GNU/find latest version:
find /path/to/dir -newermt "date"
find /path/to/dir -newermt "Feb 07"
find /path/to/dir -newermt "yyyy-mm-dd"
## List all files modified on given date
find /path/to/dir -newermt yyyy-mm-dd ! -newermt yyyy-mm-dd -ls
### print all *.pl ###
find /path/to/dir -newermt "yyyy-mm-dd" -print -type f -iname "*.pl"
Sample outputs:
The other way of doing this works on the versions of find before v4.3.3:
touch -t 02010000 /tmp/stamp$$ find /usr -newer /tmp/stamp$$ rm -f /tmp/stamp$$
Examples
To find out all files that have been modified on 2013-02-07 (07/Feb/2013), enter:
find /path/to/dir -type f -name "*" -newermt 2013-02-07 ! -newermt 2013-02-08
Sample outputs:
./output/tmp/rss.js-gzip-10881623-407-1360173602 ./images/advanced-cache.php ./images/faq/2013/02/ir-150x150.jpg ./images/faq/2013/02/warning-40px76.png
To find out all Python files (*.py) in /home/vivek/projects that have been modified on 2013-02-07 (07/Feb/2013), enter:
find $HOME/projects -type f -name "*.py" -newermt 2013-02-07 ! -newermt 2013-02-08 -print
Pass the -ls option to get detailed file listing:
find $HOME/projects -type f -name "*.py" -newermt 2013-02-07 ! -newermt 2013-02-08 -ls
To find and delete all tmp files (*.tmp) in /home/vivek/projects that have been modified on 2013-02-07 (07/Feb/2013), enter:
find $HOME/projects -type f -name "*.py" -newermt 2013-02-07 ! -newermt 2013-02-08 -delete
You should follow me on twitter here or grab rss feed to keep track of new changes.
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














{ 1 comment… read it below or add one }
find . -name “*.jpg” -printf ‘%TY-%Tm-%Td\n’ |egrep “2013-02-07″