Home
| Calendar
| Mail Lists
| List Archives
| Desktop SIG
| Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU |
James R. Van Zandt wrote, On 01/30/2005 11:33 AM: > Gregory Boyce <gboyce at badbelly.com> wrote: > >>On Tue, 11 Jan 2005, Bill Holt wrote: >> >> >>>woops... >>>find . -name '*' | xargs rm >> >>I would normally do: >> >>find . -name '*' -exec rm {} \; > > > Both of these would fail if filenames have spaces. I suggest > > find . -name '*' -exec rm "{}" \; > > - Jim Van Zandt You can solve the space-in-name problem by using find . -name '*' -print0 | xargs -0 rm Which will use \0 to delimit filenames. However, the -exec method has the advantage of not being limited by the maximum number of command line parameters and line length. -- DDDD DK KD DKK D Bush/Cheney '04: DK KD Thanks for not paying attention. DDDD
BLU is a member of BostonUserGroups | |
We also thank MIT for the use of their facilities. |