Computer Hope

Software => BSD, Linux, and Unix => Topic started by: mageshbabu on November 01, 2004, 10:50:51 PM

Title: i want know file size is mb or kb in unix
Post by: mageshbabu on November 01, 2004, 10:50:51 PM
hi:

how to know the file size in unix.is it kb or mb?
Title: Re: i want know file size is mb or kb in unix
Post by: Peeyush Maurya on December 04, 2004, 04:21:29 PM
its definetly is in kb



size=`ls -l file | awk '{print $5 }'`
stat -c %s <file>

Regards,
Peeyush Maurya (http://linux-faqs.com/)