[Novalug] what to do with really large directories (was: How to get the number of files)
jlg
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:
http://sidvind.com/wiki/Xargs_by_example
...jlg
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?
Nino
_______________________________________________
Novalug mailing list
Novalug at calypso.tux.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/novalug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://calypso.tux.org/pipermail/novalug/attachments/20080110/1e705a02/attachment.html
More information about the Novalug
mailing list