Re: Deleting many files from a directory

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

 



Hi,

--On Thursday, December 23, 2004 09:40:12 +0000 Mário Gamito <gamito@xxxxxxxxx> wrote:

When we have too many files in a directory, let's say thousands, we
cannot rm -f * on them. The system says there are too many files.
So, one must go through a tedious process of deleting by parts.

Is there a way to wipe them all at onde ?

To remove all files in all subdirectories do:

find /path/ -type f | xargs -n 50 rm

Thats much faster than 'find ...-exec...'

Cheers,
Harry

--

1024D/40F14012 18F3 736A 4080 303C E61E  2E72 7E05 1F6E 40F1 4012

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT/S dx s: a C++ ULS++++$ P+++ L+++$ !E W++ N+ o? K? !w !O !M
V PS+ PE Y? PGP+++ t+ 5-- X+ R+ !tv b++ DI++ D+ G e* h r++ y++
------END GEEK CODE BLOCK------

Attachment: pgpVjRmH3TCrJ.pgp
Description: PGP signature


[Index of Archives]     [Linux Newbie]     [Audio]     [Hams]     [Kernel Newbies]     [Util Linux NG]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Device Drivers]     [Samba]     [Video 4 Linux]     [Git]     [Fedora Users]

  Powered by Linux