Skip to content

Instantly share code, notes, and snippets.

@railsbob
Created May 13, 2010 11:06
Show Gist options
  • Save railsbob/399724 to your computer and use it in GitHub Desktop.
Save railsbob/399724 to your computer and use it in GitHub Desktop.
# Remove all files in a directory /backup/sql which are older than 7 days
find /backup/sql -mtime +168 -type f -name '*.sql' -exec rm {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment