LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   command: file size? (https://www.linuxquestions.org/questions/linux-newbie-8/command-file-size-356350/)

psychobuffalo 08-23-2005 10:26 PM

command: file size?
 
What is the command to see the sizes of files?

jrdioko 08-23-2005 10:59 PM

du

I usually do "du -sh" to show just what files/directories you want and give you "human-readable" output instead of size in bytes.

DMRansom 08-23-2005 11:02 PM

ls -sh
will give you file size in human readable format
you can get more options with
man ls

ls --help

jrdioko 08-23-2005 11:06 PM

Well that's handy. I knew "ls -lh" would do it but never saw "-s". Thanks :)

delackoo 08-24-2005 06:19 AM

Re: command: file size?
 
Quote:

Originally posted by psychobuffalo
What is the command to see the sizes of files?
du -ah/-ch/-lh/-sh filename
ls -lh/-sh filename
...

You can find more option in man:)

psychobuffalo 08-24-2005 10:30 AM

Thanks for your responses - I couldn't remember the du command. I had actually looked at the ls man, but I'm too much of a n00b to figure out the "-sh" argument.<g>


All times are GMT -5. The time now is 05:57 AM.