[Novalug] what to do with really large directories (was: How to get the number of files)
goldsmithj at yahoo.com
Thu Jan 10 19:11:30 EST 2008
xargs is your friend here - tcl might be a bit painful. The reference below has a file delete example:
Nino Pereira <pereira at speakeasy.net> wrote: Clif,
you say quite rightly:
> I find that a lot of the "normal" tools fail when I need to work with
> directories that have huge numbers of files in them.
> My usual solution then is to start an interactive Tcl shell...
which for you, as an expert Tcler (this must be a word, it sounds good,
right?), is not a problem. But, writing Tclcode is not a solution for
the rest of us.
What helps on occasion is to restrict the range of the files. To delete
all files in a large and useless directory (as I had to do recently),
the usual command
'rm *' failed, with a message 'too many files'. What did work was
'rm a*', and then
'rm b*', etc,
on occasion trying whether the number of files had shrunk enough for
'rm *' to work.
Is there a switch, or a .conf file, that sets the limits on the
amount of files a command like 'rm' can deal with? If so, where is it?
Novalug mailing list
Novalug at calypso.tux.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Novalug