Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to get file size using Unix command 1

Status
Not open for further replies.

hyy1109

IS-IT--Management
Dec 16, 2002
27
US
How to get the size of a file using Unix command?

Thanks!
 
Thanks for the reply. I found on this size that I can use the following and return me the size of a file.

wc -m filename|tail -1|awk {'print $1'}
 
Or you could have used:

ls -l filename | awk '{print $5}' **I think $5 is filesize**

But, hey, as with Unix there are many paths to the same answer!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top