when using Ubuntu at work or in daily use, it is often time to look at the current system capacity, which requires us to use the command to query the size of the current directory or file (DU) syntax format [plain] du [-ahskm] file or directory name
Parameter explanation-A: Lists all files and directory capacity, because the default is only the capacity of the statistics directory-H: Display in a more readable capacity format (g/m/k), automatically select the display unit size-S: List the total, not each individual directory occupancy capacity-K: Display in kilobytes- M: Display common command reference in MB view current directory size [plain] du-sh.
View a specified directory size [plain] du-sh directory_name display 10 maximum (minimum) directories or files in a specified directory maximum: [plain] Du-sh * | Sort-nr | Head min: [php] Du-sh * | Sort-n | Head
Linux view file and directory size (du command)