Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: lssum - summing up sizes of files



Quoting Danek Duvall (duvall@xxxxxxxxxxxxxxxxxxxxxxxx):
> > I keep wondering why "gls" doesn't aloow to "sum file sizes".
> As long as you're using GNU tools, du has a -c option which will sum up the
> sizes of the files you specify.  It's perhaps not as flexible as a zsh
> script, but for this simple thing, it gets the job done.

Sure, but - if the zsh has to do globbing anyway
then why not have it looks at the files, too?

As there is a GLOBBING modifier for "size" then I suspect
there must be a nice way to extract the size of files somehow.
Would be nice if there was an easy way to get the sum
without writing an explicit loop for this, too.

I am trying not to ask for a built-in replacement
for gls here - but then again, I wouldn't mind.  ;-)

Sven



Messages sorted by: Reverse Date, Date, Thread, Author