rh-l] RE: Large number of files in single directory
R P Herrold
herrold at owlriver.com
Sat May 28 02:41:21 UTC 2005
On Fri, 27 May 2005, Mike Wooding wrote:
>> or, in the correct directory:
>>
>> find -type f -a -exec rm {} \;
>>
>> will work
>
> Not as typed above: man find
Incorrect; it works here as written by me, 'tovrich
[herrold at dhcp11 ~]$ mkdir temp
[herrold at dhcp11 ~]$ cd temp
[herrold at dhcp11 temp]$ for i in `seq 1 5` ; do touch sample$i ; done ; ls
sample1 sample2 sample3 sample4 sample5
[herrold at dhcp11 temp]$ find -type f -a -exec rm {} \; ; ls
[herrold at dhcp11 temp]$
The -exec does not need further quoteing to protect the 'rm'
in this context; -a is a conjunction operator
-R
More information about the redhat-list
mailing list