This du -sc command shows the total size of only the current working directory. Get the total size of the current working directory Get the total size of current working directoryĭu -s command shows only the size of the current directory in which the user is active. Get size of files and directory in a current working directory in human-readable formatĭu -h command performs the same task as the 1st command, but it displays the output in a more human-readable format ( h represents human-readable format). The full form of DU is disk usage, so this command lists all the directory and subdirectories names and their sizes (in bytes) present in the active directory in which the user is working. Get size of files and directory in current working directory You can use the ls -sh command to find out the size of the available files in the directory Below listed are the majorly used du- commands and their respective outputs: Get size of files in the directory To know the exact size of the directories, we use disk usage-related commands (du commands). In dealing with Linux, we have the ls -l command, which lists only the directories metadata. Listed below are the two approaches to perform it: In this article, we will explain the two approaches to get the total size of a directory in Linux. In Linux, we have two kinds of methods using which we can know the disk drives size, their subdirectories size, etc. If you are a Linux user, then you must know to find the disk size and memory distribution by their operating system.
0 Comments
Leave a Reply. |