Find and remove in one line. HTML files for example. This prevents bash (or the rm it calls) from bailing when it finds a file with a space in it.
find -type f -name "*.ht*" | while read file; do rm "$file"; done
Written by timd on Dec. 3, 2007 .
Find and remove in one line. HTML files for example. This prevents bash (or the rm it calls) from bailing when it finds a file with a space in it.
find -type f -name "*.ht*" | while read file; do rm "$file"; done
Tags : linux