179k views
1 vote
How to know the size of a folder in linux

1 Answer

3 votes

Final answer:

To determine the size of a folder in Linux, use the 'du' command in the terminal with the options '-sh' followed by the directory name to get a human-readable output of the size.

Step-by-step explanation:

To know the size of a folder in Linux, you can use the du (disk usage) command in the terminal. This command provides information on the amount of disk space used by the specified files or directories. To find out the total size of a folder, open a terminal and type du -sh directoryName, where directoryName is the name of the folder you want to check. The -s option summarizes the total size, and the -h option provides the output in a human-readable format (e.g., K, M, G).

User Linusz
by
7.6k points