Created
December 25, 2014 20:41
-
-
Save arturoherrero/c99fcb0827a3bcc9e02e to your computer and use it in GitHub Desktop.
Delete files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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