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.
There's always perl, if you can rely on it being present...
perl -e "@x = stat('$file'); "'print $x[7]'
Some of these print the number of blocks allocated for the file, and
others print the number of bytes. Which did you want?
--
Bob Miller K<bob>
kbobsoft software consulting
http://kbobsoft.com [EMAIL PROTECTED]
_______________________________________________
EUGLUG mailing list
[EMAIL PROTECTED]
http://www.euglug.org/mailman/listinfo/euglug