What is SSH?
SSH is meant as Secure Shell. The SSH is a program for logging into the remote machine and for the executing commands in the remote machine. SSH provides an authentication by using the private key. It is the root access to your account from the remote system in a secured manner. SSH access is enabled for VPS and dedicated server.
Linux commands to check folder size:
Disk Usage (du) command is a standard Unix/Linux command. It is used to check the information of disk usage of files and directories in the system. This command also displays the files and directory sizes. The du command with various options can provide the results in many formats. Using SSH, log in to the server as a root user and run the following commands.
# du
– Displays the number of disk blocks in the home directory along with the subdirectories.
# du-h
– Displays the size of all folders in the directory in human readable format. That means the size of folders can be seen in Bytes, Kilobytes, Megabytes, and Gigabytes.
# du- sh
– It displays the grand total disk usage size of a directory.
# du-a
– This command displays the disk usage of all files and directories.
# du-ah
– It displays the disk usage of all files and folders in human readable format(Kb, Mb).
# du-k
– Displays the disk usage of a directory tree with its subtrees in Kb (size in 1024 bytes units).
# du-ha--time
– Displays the disk usage based on the modification of time by using the flag “-time”.
# du-ch
– It displays the grand total disk usage space at the last line.
# du-mh
– Displays the disk usage of a directory tree along with its subtrees in Megabytes(Mb). In this option, “-m” counts the blocks in Mb units and “-h” stands for the human-readable format.
#du-ah--exclude="*.txt"
– Displays the disk usage of files and directories by excluding the file that matches the given pattern in the command. This command excludes the “.txt” format while calculating the total size of the directory.