RE: Large number of files in single directory

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

 



--- "Burke, Thomas G." <tg.burke@xxxxxxx> wrote:
> I delete them by character...  e.g. rm -rf *1.tmp, rm -rf *2.tmp, and
> so on.  Don't know of any other way to do it. - although I wrote a
> little C program once to handle it for me.

 It's a shell limitation. There's a utility,
 "xargs" that will help work around this.

 man xargs


> -----Original Message-----
> From: redhat-list-bounces@xxxxxxxxxx
> [mailto:redhat-list-bounces@xxxxxxxxxx]On Behalf Of Chris
> Sent: Wednesday, May 25, 2005 1:19 PM
> To: redhat-list@xxxxxxxxxx
> Subject: Large number of files in single directory
> 
> 
> 
> There seems to be a filesystem limitation on most flavors of Linux
> I've 
> worked on, in terms of a max number of files in a single directory -
> before 
> tools like tar, gzip, rm, mv, cp and others stop working properly. 
> For 
> example, I have some users that have 2000+ files in a single
> directory (some 
> as many as 10,000 files) and trying to tar these directories is
> always 
> coming up with "argument list too long." 
> 
> Is there a way for tar and these other tools to "see" all these files
> and 
> process them as normal?  I recall once I had to resort to something
> like 
> "find . -print | xargs rm -fr" to remove thousands of files from a
> single 
> directory.  Is doing something similar but replacing "rm" with "tar"
> the 
> only way to make this work, or does tar have some sort of command
> line 
> switch (I couldn't find one) to work with extremely long argument
> lists? 
> 
> Chris 
> 
> 
> -- 
> redhat-list mailing list 
> unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
> 
> https://www.redhat.com/mailman/listinfo/redhat-list 
> 
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
> 

He who laughs last thinks slowest.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
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