Skip to content

Instantly share code, notes, and snippets.

@arturoherrero
Created December 25, 2014 20:41
Show Gist options
  • Save arturoherrero/c99fcb0827a3bcc9e02e to your computer and use it in GitHub Desktop.
Save arturoherrero/c99fcb0827a3bcc9e02e to your computer and use it in GitHub Desktop.
Delete files
http://stackoverflow.com/q/11289551/462015
# Delete hundred of thousands of files:
$ rm -f /home/apps/ishows/images/
/bin/rm: cannot execute [Argument list too long]
$ find /home/apps/ishows/images/ -type f | xargs /bin/rm
# Delete files that was last accessed n*24 hours ago, e.g. +5 days
$ find /home/apps/ishows/images/ -type f -atime +5 | xargs /bin/rm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment