RE: [CentOS] Computer 1A question

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



On Fri, 4 Aug 2006 at 5:17pm, Hugh E Cruickshank wrote

From: Seán O Sullivan Sent: August 4, 2006 17:10

Todd Cary wrote:
I want to delete all files that have the pattern of "*.zip" in the
directory /home/mydir and all sub-directories.
find /home/mydir -name "*.zip" -type f -print0 | xargs -0 rm


Or: find /home/mydir -name "*.zip" -type f -exec rm {} \;

To complete the discussion, the first form should be faster, as it will only spawn 1 rm command rather than one for every result of 'find'. This can make a big difference if a lot of results are expected.

--
Joshua Baker-LePain
Department of Biomedical Engineering
Duke University
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux