Home | Mirror | Search

10. rm - remove files or directories

10.1. -bash: /bin/rm: Argument list too long

ls -1 | xargs rm -f
find . -name 'spam-*' | xargs rm
find . -exec rm {} \;

ls | xargs -n 10 rm -fr # 10個為一組
			

10.2. zsh: sure you want to delete all the files in /tmp [yn]?

yes | rm -i file
			
comments powered by Disqus