On Wed, Dec 08, 2004 at 09:58:33PM -0800, Bob Miller wrote:
> Jacob Meuser wrote:
>
> > $subject is the question, is du (part of) the answer, or is there
> > something better?
>
> du -k $file
> ls -l $file | awk '{print $5}'
> expr `stat --format="%b \* %B" $file`
>
> I don't know if any of those are really portable very far off the
> mainstream. I've seen du commands that didn't support -k, ls commands
> that didn't print the owning group by default, and the stat command
> seems to be a GNU-only thing.
ok, that about what I thought.
> There's always perl, if you can rely on it being present...
>
> perl -e "@x = stat('$file'); "'print $x[7]'
I may move the whole script to perl anyway, as I'm going to need a
bunch of regex stuff.
> Some of these print the number of blocks allocated for the file, and
> others print the number of bytes. Which did you want?
bytes. the files need to fit on a DVD.
--
<[EMAIL PROTECTED]>
_______________________________________________
EUGLUG mailing list
[EMAIL PROTECTED]
http://www.euglug.org/mailman/listinfo/euglug