On Tue, 09 Oct 2007 14:54:41 -0400 Mario DeFazio wrote:
> Is there a fast ksh method (builtin, operator, etc.) for getting
> the size of a file in bytes?

> I generally use $(wc -c < file) because I think it's more portable than 
> parsing 'ls' output,
> but it's expensive just from the fork&exec alone -- maybe even more 
> expensive than 'ls'
> if wc is actually *counting* bytes as opposed to getting the size from 
> the i-node.

the ast wc -c uses stat.st_size for regular files
wc is also part of -lcmd, so this shoulod make it a builtin
        builtin wc

_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to