How can I check the size of a folder in Linux?

You can use the following command in a Linux system to view the size of a directory:

  1. The “du” command is used to estimate the disk space usage of a file or directory.
  2. du -h : Display the size of the folder in a human-readable format.
  3. Show only the total size of the folder by using du -sh .
  4. You can use the ncdu command to interactively view the sizes of folders. If it is not installed, you can use the sudo apt install ncdu command to install it.
  5. ncdu : start interactive interface for viewing folder sizes.

With these commands, you can easily check the size of the folders occupying space.

Leave a Reply 0

Your email address will not be published. Required fields are marked *


广告
Closing in 10 seconds
bannerAds