[Novalug] Re: what to do with really large directories (was: How to get the number of files)
Clif Flynt
clif@cflynt.com
Thu Jan 10 21:40:57 EST 2008
On Thu, Jan 10, 2008 at 06:45:16PM -0500, Nino Pereira wrote:
> >...
> > 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.
But, everyone *should* be an expert Tcler! :)
Hit www.msen.com/~clif/TclTutor.html for a CAI package to learn Tcl
with. The kinds of folks who frequent this list will have little
trouble working through the lessons in a couple hours.
> 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 a*', and then
> 'rm b*', etc,
I agree with others that xargs is probably the the best solution to
this problem.
The solution I've tended to use from a bash prompt (when I wasn't
Tcl'ing), is:
for i in 0 1 2 3 4 5 6 7 8 9
do
rm *$i
done
or some variant with letters, suffixes, etc.
--
.... Clif Flynt ... http://www.cflynt.com ... clif@cflynt.com ...
.. Tcl/Tk: A Developer's Guide (2nd edition) - Morgan Kauffman ..
.. 15'th Annual Tcl/Tk Conference: Oct 2008, Philadelphia, PA..
............. http://www.tcl.tk/community/tcl2008/ ............
More information about the Novalug
mailing list