To find out the directory for the table of contents on linux, use the command ls, if you pay attention, it will display the directory size is always. The size represents the space on disk use to store the meta-information for the directory, not what is loade.
A way to see the actual linux directory size of a directory is to use the du command, which is short for “disk usage.
The du command displays the amount of file space use by a particular file or directory. If the specifie path is a directory, du summarizes the disk usage of each subdirectory in that directory.
If No Path is Specifie Du Reports the Disk Usage of the Current
When invoke without any options, du displays the disk. Usage of the given directory and its respective subdirectories in bytes.
Usually, you want to display the space occupie by a directory in an easy-to-read format. For example, to get the total size of the var directory, you would run the following command.
Command with sudo because most Bulgaria Mobile Database of the files and directories inside. The var directory are owne by the root user and are not readable by a normal user. If you omit sudo , the du command will print “du: cannot read directory.
shows only the total size of the specifie directory. Do not show the total file size for subdirectories.
Also read: Google Translate tool on linux: easily translate various texts using only keyboard shortcuts
What if I Want to Display the Disk Usage of a First level Subdirectory
The first is to use the asterisk symbol as shown below. Which means “matches anything that does not start Country List with a period. The options tell du to print the grand total of all sizes: Another way to get reports on disk usage from a first-level subdirectory is to use –max-dept
By default, the du command shows the disk space use by a directory or file. To find the apparent size of a directory, use the –apparent-size option “apparent size” or the apparent size of a file is how much data is actually in the file.