Folder size SSH Centos

Folder size SSH Centos

Here I leave a code to run it in SSH (Console) to know the size of a specific folder.

du -hlsc <nombre de carpeta>

This command, used without options, indicates the total storage space used by all the files in the directory in which we are located. If there are subdirectories in it, it will also indicate its total size. Here I leave the parameters in which they can be used.

-a Shows the space usage of each file.
-k Write the size of the files in units of 1024 bytes, instead of the units of 512 bytes by default.
-s Instead of the default output, it reports only the total sum of each of the specified files.
-L Process the symbolic links using the file or directory to which the symbolic link references, instead of the link itself.
-x When evaluating file sizes, evaluate only those files that have the same device as the file specified in the operand.
-h List in legible form for the human being.


Please enter your comment!
Please enter your name here