You can use the du command to calculate the size of the current folder in Linux. The du command stands for “disk usage” and it gives you information on the amount of disk space that a file or directory is occupying.
To calculate the size of the current folder, simply navigate to the directory in the terminal and run the following command:
``
du -sh
1 | Breaking down the options used in the command: |
du -h
This command will list the size of every file and subdirectory in the current directory, in a human-readable format.