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

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

 



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

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux