Skip to content

Instantly share code, notes, and snippets.

@colinsullivan
Created April 6, 2011 00:39
Show Gist options
  • Save colinsullivan/904902 to your computer and use it in GitHub Desktop.
Save colinsullivan/904902 to your computer and use it in GitHub Desktop.
A script to delete any item inside a particular folder if it is older than 7 days.
find /path/to/folder -not \( -path "/path/to/folder" \) -Btime +7d -delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment