Check file size in human understandable format (KB, MB and GB’s)

Generally we list contents of current directory with the ls command in our terminal. To see more detail we can use ls -l command to see author of file, permissions, size in bytes.

But for humans to easily understand the file size we can list the files with sizes in Kilobytes, Megabytes and Gigabytes (when applied) with:

ls -lh

But it lists file sizes good but not the directories. So for the directories:

du -h .

Replace . (dot) with the directory you want.

To see file system disk space usage:

df -h

 To know more about these commands you can always do man <command_name>.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close