Unix command file size du


















Specifying block size for du reports Like it was mentioned before, du calculates all the sizes in blocks of data. Finally, most common releases of Linux have -h option for you, which reports all the figures in an even easier form, specifying K for kilobytes, M for megabytes and so on: [email protected] du -h 4.

Report sizes of both files and directories Using -a parameter, it is possible to have du report sizes of not only the directories, but all the files as well. Compare this directory sizes : [email protected] du -h 4. If you use this option but specify no directory, it will produce only one line of output, summarizing the size of the current directory: [email protected] du -sk Get in touch!

DF Command in Complete details. DU Command : It only gives you details about the how much memory is used by file, also very useful in getting details of largest file. Here you will got all options from MAN du command. Output: It will list all the directories and their respective size of all the file systems starting from the current directory.

When you run the du command with h parameters du -h, Here lowercase h is used for human-readable format. Output: It will list all the directories and their respective size in kb, Mb, and Gb size which is easily understandable.

When you run the du command with h parameters du -a, Here lowercase a is used for all files. Output: It will list all the directories and files and their respective size in kb, Mb, and Gb size which is easily understandable. When you run the du command with h parameters du -sh, Here lowercase s is used for getting total size files.

Output: It will total the size of all the directories and files of a given path. When you run the du command with h parameters du -kh, Here lowercase k is used for getting details in the block size of 1k. When you run the du command with m parameters du -m, Here lowercase m is used for getting details in the block size of 1m. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown.

The Overflow Blog. Podcast Helping communities build their own LTE networks. Podcast Making Agile work for data science. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually.

Linked Related Hot Network Questions. Question feed. If you want to check disk space in Linux, use the df command. Did you like the tutorial?

Did it help you? Let me know in the comments. If you have some other cool tip about du command, why not share it with us? Please enter at least 3 characters 0 results found. Abhishek Prakash. The du command in Linux is used for checking the size of directory. Here are various ways you can find the size of directory in Linux with the du command. Table of Contents. Using du command to get directory size in Linux I am going to show you various examples of the du command that you can use to check the directory size and the disk utilization.

The syntax for the du command is pretty simple. Show only the total size of the directory in Linux If you find the output of the du command too verbose and would like to see just the total size of the directory in a human readable format, you can use the sum option -s. For example, I am going to use the -sh options to show the total size of two directories here.

Did you find it useful? Send login link.



0コメント

  • 1000 / 1000