[NTLUG:Discuss] rm doesn't recurse

David White davidnwhite at optusnet.com.au
Fri May 7 08:26:19 CDT 2004


> So, will both these scripts do the same?

Yes, both scripts do the same thing. Personally I prefer the form I wrote
(the for loop), because it is a more general form that will work whenever
you have to loop over something over and over in shell.

> I would experiment but can't think of any types of files I want to
> delete right now. I'm thinking these commands would delete all files
> with extension "zip" throughout the whole partition. If so, that's very
> powerful.

See how both commands have a '.' immediately after 'find'? That refers to
the directory they operate on -- i.e. the current working directory. You
could specify a different directory in place of the '.'.

David




More information about the Discuss mailing list