Skip to content

Instantly share code, notes, and snippets.

@jpcaparas
Last active May 21, 2019 00:06
Show Gist options
  • Save jpcaparas/0e8b175667038cda96e886c7a2cd910e to your computer and use it in GitHub Desktop.
Save jpcaparas/0e8b175667038cda96e886c7a2cd910e to your computer and use it in GitHub Desktop.
GNU "find" examples
# Find top level directories that are aged or are older than 10 days and delete them.
find . -mindepth 1 -maxdepth 1 -not -newermt '10 days ago' -exec rm -rf {} +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment