Created
December 18, 2017 10:23
-
-
Save chinboon/0e47cc3c122073e7604a55df09ffe238 to your computer and use it in GitHub Desktop.
find-files-modified-x-minutes-ago.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # MAC | |
| # +30 is older than 30 day, -30 would be modified in last 30 days. | |
| # mtime n modified time (n* 24 hours) | |
| # atime n accessed time (n* 24 hours) | |
| # mmin n modified time (n * 1 min) | |
| # find all files modified since 2 hours ago | |
| find . -type f -mtime -2 -exec ls -l {} \; | |
| # find all files modified since 30 minutes ago | |
| find . -type f -ctime -30s -exec ls -l {} \; | |
| # Linux | |
| # find all files modified since 30 mins ago | |
| find . -type f -mmin -30 -exec ls -l {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment