Skip to content

Instantly share code, notes, and snippets.

@mariadanieldeepak
Last active May 7, 2023 16:57
Show Gist options
  • Save mariadanieldeepak/c311f7a151148d8802892d0c7ce2f0a7 to your computer and use it in GitHub Desktop.
Save mariadanieldeepak/c311f7a151148d8802892d0c7ce2f0a7 to your computer and use it in GitHub Desktop.
List Files Modified X Days Ago
# Remove all files that were modified until two days ago.
find /path/to/directory -type f -mtime +2 -delete
# Remove all files in current directory.
find . -type f -mtime +2 -delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment