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

 



===snip====

> BTW, I'm running this command, as suggested by an earlier poster:
> 
> find . -type f -exec rm -fv '{}' +

This is extremely inefficient.  It spawns a process for every file.
With as many files as you have this will take days.

This is better:

find . -type f -print0 |xargs -r -0 rm -f

It spawns a process as if fills up the maximum size command line.
Probably hundreds of times faster than the original.

or this:

find . -depth -type d -print0 |xargs -r -0 rm -Rf

Which deletes directories and is much faster than the previous.

but I expect this is best:

find . -depth -delete

or if you want to see them fly on you screen

find . -depth -print -delete

Your original find did not delete the directories, just the files in
them.  Is that what you want?  Or did you want to delete the directories
as well.  If you want to preserve the directory structure, then this is
probably what you want:

find . -depth -type f -delete
or
find . -depth -type f -print -delete
to watch them go away.

Good luck

Rich
No virus found in this outgoing message.
Checked by AVG - www.avg.com
Version: 8.5.392 / Virus Database: 270.13.30/2262 - Release Date: 07/25/09 18:01:00
-- 
fedora-list mailing list
[email protected]
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]
  Powered by Linux