Re: [fedora-list] What the hell are these dirs?

[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
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux