To find the top 10 files and directories in the current directory, we will use the “du” command with some options, along with the “sort” command to list the sizes in descending order, along with the “head” command to get only the top 10 items.
(output in K Bytes)
Note the following “du” command options:
-c print the total ==> produce a grand total
-s summarize ==> display only a total for each argument
-k size in K bytes
-m size in M bytes
Another example to produce the output in M Bytes: