Show Linux File Size

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/show-linux-file-size/
PINTEREST
PINTEREST
INSTAGRAM

One of the most asked question about files in Linux is how can I list file sizes in different formats? In this post we will look different commands to get file sizes.

Ls

ls command is primary command to list and get information about files and directories in Linux. ls command can be used with -l parameter to get size of files.

We listed file nmap-7.31.tgz file size in byte but we can make the size information more readable by using -h option.

Du

du command is used to get disk usage.

We have simply listed file without providing any parameter. Provided size is in KB. If we want to get human friendly result we can use following.

Stat

Stat command is used to get file system related information about files and directories. Using stat with filename parameter will provide size information in byte mode too.

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/show-linux-file-size/
PINTEREST
PINTEREST
INSTAGRAM

LEARN MORE  Linux tar Command and How To Tar A Directory

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)