Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: lssum - summing up sizes of files
- X-seq: zsh-users 1608
- From: Danek Duvall <duvall@xxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: Re: lssum - summing up sizes of files
- Date: Sat, 13 Jun 1998 15:38:45 -0400
- In-reply-to: <19980613211233.A5224@xxxxxxxxxxxxxxxxx>; from Sven Guckes on Sat, Jun 13, 1998 at 09:12:33PM +0200
- Mail-followup-to: zsh-users@xxxxxxxxxxxxxxx
- References: <19980613181013.A4302@xxxxxxxxxxxxxxxxx> <980613100641.ZM27081@xxxxxxxxxxxxxxxxxxxxxxx> <19980613211233.A5224@xxxxxxxxxxxxxxxxx>
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