Re [Gllug] rm -R not working on Fedora

Tethys tet at createservices.com
Fri Feb 11 22:59:45 UTC 2005


Benedikt Heinen writes:

> 	find * -type f -name  "*.php.bak" | xargs rm
>
>Note, you shouldn't use the latter if you have files/directories with 
>spaces in their names, because rm will take the individual parts 
>seperately

Easily cured with:

	find . -type f -name "*.php.bak" -print0 | xargs -0 /bin/rm -f

You should always use that form anyway, just in case someone's added a
filename or directory containing a space and you don't know about it.

Tet
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list