Last active
April 16, 2022 13:14
-
-
Save nutrino/0468e041522fe010a22b330180feeddf to your computer and use it in GitHub Desktop.
List files older/later than specific time diff
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
| # https://unix.stackexchange.com/a/10043 | |
| # List files later than 1 day diff | |
| find . -maxdepth 1 -mtime -1 | |
| # List files older than 1 day diff | |
| find . -maxdepth 1 -mtime +1 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Delete files older than 7 day diff
find . -maxdepth 1 -mtime +7 -exec rm {} ;