Dec 16, 2002 #1 hyy1109 IS-IT--Management Dec 16, 2002 27 US How to get the size of a file using Unix command? Thanks!
Dec 16, 2002 #2 danielhozac Programmer Aug 21, 2001 2,058 SE Code: wc -c <filename> //Daniel Upvote 0 Downvote
Dec 16, 2002 #3 sleipnir214 Programmer May 6, 2002 15,350 US I was thinking: ls -l <filename> Want the best answers? Ask the best questions: http://www.tuxedo.org/~esr/faqs/smart-questions.htmlTANSTAAFL! Upvote 0 Downvote
I was thinking: ls -l <filename> Want the best answers? Ask the best questions: http://www.tuxedo.org/~esr/faqs/smart-questions.htmlTANSTAAFL!
Dec 16, 2002 Thread starter #4 hyy1109 IS-IT--Management Dec 16, 2002 27 US 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'} Upvote 0 Downvote
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'}
Dec 16, 2002 1 #5 AIXSPadmin MIS May 3, 2002 633 US 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! Upvote 0 Downvote
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!