Archives Dec. 3, 2007

One line Seach and Destroy

Chip

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