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

Re: lssum - summing up sizes of files



On Sat, Jun 13, 1998 at 09:12:33PM +0200, Sven Guckes wrote:

> Quoting Bart Schaefer (schaefer@xxxxxxxxxxxxxxxx):
> > In 3.0, there's no direct way to read the size of the file into the shell.
> > You'd have to run "ls" and parse the output, or something.
> 
> I see.  Too bad.
> And I keep wondering why "gls" doesn't aloow to "sum file sizes".
> Doesn't everybody need this kind of thing every day?

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.

Danek



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