Question: The command du reports on disk usage. By default, it will descend a full set of subdirectories and report on all of them. With the

The command "du" reports on disk usage. By default, it will descend a full set of subdirectories and report on all of them. With the "-s" flag, it will only report summaries of those files listed.

This means that if you go into a directory and type "du -s *", you can get a list of what items under that directory use up the most disk space. But the list will not be sorted.

Suppose I am close on my disk quota. I need to find out where in my directory tree I should clean up first.

Write a single-line shell pipeline which starts with "du -s *", and will list (in descending order by size) the 10 biggest disk hogs in the current directory.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!