How to find out how much space a directory takes up using Linux

H

How Can We Help?

How to find out how much space a directory takes up using Linux

In the command line type the following command within the desired directory

{codecitation class=”brush: bash;”}du -c{/codecitation} This will give you the usage/size of all the folders within that particular directory. 

du =  estimate file space usage
-c = total

To get the size/usage in a Human readable format eg. Megabytes/Gigabites append the -h option to the command above.

Example below:

{codecitation class=”brush: bash;”}du -ch{/codecitation}

About the author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

About Author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

Follow Me