How do I check the size of a Linux file in GB?

Kim Thu Đoàn

New member
How do I check the size of a Linux file in GB?
Answer
Use ls command for files and du command for directories. ls command will not list the actual size of directories(why?). Therefore, we use du for this purpose. Including -h option in any of the above commands (for Ex: ls -lh * or du -sh ) will give you size in human readable format ( kb , mb , gb , …)
 

Tìm kiếm

Back
Top