Show the total size of a folder recursively with du
$ du -sh folder_1/
13 GB folder_1
‘Recursively’ means that du will compute the size of folder_1 including all other folders that are nested under it, for example folder_2 and folder_3.
folder_1/
├── folder_2
└── folder_3
The flag -s tells du to hide the details and only show the total, in our case 13 GB folder_1.
For more info, see man du.
See also https://yctct.com/show-size to show size of files from the command line interface.
personal computing command-line interface (cli) gnu linux trisquel shell literacy office applications wiki du