Skip to content

Instantly share code, notes, and snippets.

@leafnode
Last active August 24, 2018 09:02
Show Gist options
  • Save leafnode/e5a0f17cd3b5cf9dbbab027b1d830de3 to your computer and use it in GitHub Desktop.
Save leafnode/e5a0f17cd3b5cf9dbbab027b1d830de3 to your computer and use it in GitHub Desktop.
Remove files older than x days #shell #tips
find {{ file_retention.path }} -mindepth 1 -maxdepth 1 -type d -mtime +$file_retention_days -print0 | xargs -0 rm -rf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment