Earlier today I was asked for the command to show a file size in UNIX and so I thought I would share. There are, of course, a few ways to do this. One great little command to keep handy is:
du -h. The du (display utility) will print out the size of a file or directory. The -h will make it “human readable” (put the sizes in Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte). So, next time you need file or directory sizes, use
du -h and be done with it!