Tuesday, July 15, 2014

how to see file size linux

Use ls -s to list file size, or if you prefer ls -sh for human readable sizes.
For directories use du, and again, du -h for human readable sizes.

  input  : ls -sh (Location of Directory)
  Example: (ls -lh /home/es/Downloads/)

  input  : ls -sh  /home/es/Downloads/
  output : total 2.3G
 -rwxrwxr-x 1 es   es    66M 2013-02-27 23:39 jdk-6u41-linux-i586-rpm.bin
 -rw-r--r-- 1 root root 1.2G 2013-02-28 01:32 linux_11gR2_database_1of2.zip
 -rw-r--r-- 1 root root 950M 2013-02-28 01:24 linux_11gR2_database_2of2.zip
 -rw-rw-r-- 1 es   es    44M 2013-04-03 21:26 luntbuild-1.6.2.zip

Output in putty:


                                                                                                                                                         

input: du -sh /home/es/Downloads/

Output in putty




No comments:

Post a Comment