linux view file (folder) size

  1. ls  -al displays the file or folder size in bytes;

     

  2. byte b, kilobyte kb,

    1G=1024M=1024*1024KB=1024*1024*1024B

     

  3. Usually the parameter h is added to visually display the size, and G, M, etc. are used to display large files

    ls  -alh

 

For example, to view the size of the home directory:
du -s / home
You can also:
du -sh / home

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326445158&siteId=291194637