[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: rh-l] RE: Large number of files in single directory



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 dhcp11 ~]$ mkdir temp
[herrold dhcp11 ~]$ cd temp
[herrold dhcp11 temp]$ for i in `seq 1 5` ; do touch sample$i  ; done ; ls
sample1  sample2  sample3  sample4  sample5
[herrold dhcp11 temp]$ find -type f -a -exec rm {} \; ; ls
[herrold dhcp11 temp]$

The -exec does not need further quoteing to protect the 'rm' in this context; -a is a conjunction operator

 -R


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]