What is du sh?

What is du sh?

3. To get the summary of a grand total disk usage size of a directory uses the option “-s” as follows. [root@tecmint]# du -sh /home/tecmint 674M /home/tecmint. 4. Using the “-a” flag with the “du” command displays the disk usage of all the files and directories.

How do you use du command?

To utilize the basic usage of the du command, simply open a terminal window, type du, and hit Enter. The output displays each directory’s disk usage and path, along with the total disk usage of the parent directory.

How do I find the size of a subdirectory in Linux?

Get Size of All Sub-Directories To recursively get all subdirectories of /var/ , you can use sudo du /var/ -h . Or you can pass a number to the –max-depth that you’re sure is greater than or equal to the max level of sub-directory depth: sudo du /var/ -h –max-depth=999 .

What is the unit of du?

du computes file space in units of 512 bytes. The actual disk space used by files and directories may be more, since some systems allocate space in units of some multiple of a sector. On UNIX System V, it is usually two sectors; on UNIX Version 7, it is one sector. The allocation unit is file system specific.

What is du used for?

‘Du’ is used as a preposition meaning ‘of’ or as an adjective meaning ‘any/some. ‘ ‘De’ means ‘of/from’ in when relating to a noun.

What does du output mean?

du reports the amount of file space used by the files indicated by the given path name. If the path name is a directory, du reports the total amount of file space used by all files in that directory and in each subdirectory in its hierarchy.

What is M in du *?

You can use du -h or –human-readable options to append a size letter to each size, such as ‘M’ for mebibytes. Powers of 1024 are used, not 1000; ‘M’ stands for 1,048,576 bytes. This option is equivalent to ‘–block-size=human-readable’.

Does du mean of?

How do I open a subdirectory in Linux?

Try any one of the following command:

  1. ls -R : Use the ls command to get recursive directory listing on Linux.
  2. find /dir/ -print : Run the find command to see recursive directory listing in Linux.
  3. du -a . : Execute the du command to view recursive directory listing on Unix.

How can I see all subdirectories in Linux?

If you name one or more directories on the command line, ls will list each one. The -R (uppercase R) option lists all subdirectories, recursively. That shows you the whole directory tree starting at the current directory (or the directories you name on the command line).