You can use it. du Use the following command in your terminal to query the size of each folder in the Linux file system and identify the largest folders:
du -h / | grep '[0-9\.]\+G' | sort -rhamong, / The root directory to search in. -h The option allows the results to be displayed in a human-readable format.grep '[0-9\.]\+G' Displays only folders larger than 1 GB.sort -rh Indicates that the results should be sorted in descending order by value.
If you want to display only the top five largest folders, you can modify the above command as follows:
du -h / | grep '[0-9\.]\+G' | sort -rh | head -n 5among, head -n 5 Indicates that only the top five results will be displayed.