[NTLUG:Discuss] rm doesn't recurse

Kenneth Loafman ken at lt.com
Fri May 7 08:52:21 CDT 2004


Cameron, Thomas wrote:
>>-----Original Message-----
>>From: discuss-bounces at ntlug.org [mailto:discuss-bounces at ntlug.org]On
>>Behalf Of Bobby Wrenn
>>Sent: Thursday, May 06, 2004 8:39 AM
>>To: NTLUG Discussion List
>>Subject: [NTLUG:Discuss] rm doesn't recurse
>>
>>
>>rm man page says -r option will make rm recurse through 
>>directories. It 
>>doesn't.
>>
>>I'm trying to remove *.zip from all sub-directories below the 
>>current. 
>>If rm won't do it, what will?
> 
> 
> 
> find /path/to/directory -name "*.zip" | xargs rm -f

I like the rm -r method myself.  Since its recursive, it does not expand all 
the arguments to the command line.  I have run across cases where expanding 
the find blows the command line length out of the water.

...Ken




More information about the Discuss mailing list