Skip to content

Instantly share code, notes, and snippets.

@ob1-sc
Created January 6, 2021 14:21
Show Gist options
  • Save ob1-sc/bb0e28a3dcf03e4ce790de825d31552d to your computer and use it in GitHub Desktop.
Save ob1-sc/bb0e28a3dcf03e4ce790de825d31552d to your computer and use it in GitHub Desktop.
Delete files older than x days
find /path/to/files -type f -mtime +7 -name '*.*' -print0 | xargs -r0 rm --
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment