Keep in mind that you can specify any directory with the command – you don’t have to actually be in the directory you’re checking. In these examples, we’ve been running du from our present working directory. If you’re using the -h option on du, make sure you also use it on sort. To sort these directories by size, making it easy to identify which ones are consuming the most space, we can pipe our du command to the sort utility. If you have a deep structure, we can use the -max-depth=N flag to tell du how many subdirectories deep it should traverse. This gives us a rather granular look at how much space each subdirectory is using. ![]() Let’s see what happens if we have a deeper folder structure.Īs you can see, the “Debian-based” and “RHEL-based” directories have two and three subdirectories, respectively.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |