[Gllug] rm -R not working on Fedora

Benedikt Heinen gllug at ml.icemark.net
Fri Feb 11 21:35:50 UTC 2005


>> You're being tripped up by shell expansion.  Quote your file pattern:
>> rm -R "*.php.bak"
>
> This didn't even remove .php.bak files within the current directory, never
> mind the subdirectories.

And that behaviour is correct -

 	rm -R "*.php.bak"

should only remove a file or directory that is literally called

 	*.php.bak

And if that happened to be a directory, it would remove it and 
recursively all the files/subdirectories contained therein.

(Note: rm won't even try to expand a wildcard passed to it - it leaves the 
expansion to the shell. 'find' is one of a very few commands that do 
wildcard expansion on their own; so for THOSE you need to quote the 
wildcards.)





   Benedikt

--
 	It seems I think I am, therefore it seems I am, I think!
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list