Show Folder/File Size in Linux

Something I had to look up some time ago since I simply never used it before. Although it is, I think very commonly use.

If you would like to know the size of, for example, a folder in linux. And you would like to see it in a readable volume, which is nice. You can use the command:

du -sh

This will give you the size of the current folder. But if you type the path of a remote folder behind this command you’ll be see the size of the folder and subfolders:

du -sh /etc/

The output will be something like

14M     /etc/

It’s a small command, but it could come in handy ;-).


One thought on “Show Folder/File Size in Linux

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: