article_submissions]$ du -sh /home/tcarrigan/article_submissions/ Instead, they allow us to get a summary of the directory's usage in a human-readable format. With their powers combined, they do not become an eco-friendly demi-god. The -s flag is added to the -h flag on occasion. article_submissions]$ du -h /home/tcarrigan/article_submissions/ġ2K /home/tcarrigan/article_submissions/my_articlesģ6K /home/tcarrigan/article_submissions/community_content If we now run the du -h command on the same directory, we see that the 12, 36, and 48 values are in KB. This format provides a unit of measure (Bytes). The -h flag prints size outputs, such as the ones above, in a human-readable format. Here is where the options become necessary. There is no indication as to what unit of measure is being used with the standard command, making this output less than useful. The bottom row is a summary of the entire /home/tcarrigan/article_submissions directory. The values on the far left are the disk usage, followed by the specific directory responsible for that usage. You can see that there are three lines of output given by the basic command. article_submissions]$ du /home/tcarrigan/article_submissions/ġ2 /home/tcarrigan/article_submissions/my_articlesģ6 /home/tcarrigan/article_submissions/community_content Let's first look at the standalone command, and then add in various options. The aim here is to introduce the basic flags that people use, but also to look at some that are less common in hopes of improving our use of du. Also, like many Linux commands, most users only use the same two or three flags to meet their specific set of needs. It is best applied to specific directories and allows many variations for customizing the output to meet your needs.Īs with most commands, the user can take advantage of many options or flags. The du command is a standard Linux/Unix command that allows a user to gain disk usage information quickly.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |