How can I check the storage space usage in Linux?
In a Linux system, you can use the following command to check the storage space usage:
- The df command is used to display the disk space usage of the file system.
df -h
This command will display all mounted file systems and show disk space usage in a human-readable format, including total capacity, used space, available space, and mount point information.
- du command: used to estimate the disk space usage of files and directories.
du -sh /path/to/directory
This command will display the disk space usage of the specified directory, with the “-s” option indicating only the total amount and the “-h” option showing it in a human-readable format.
- The “ls” command is used to display a list of files and directories.
ls -lh /path/to/directory
This command will display the files and directories in the specified directory, showing the size of the files in a human-readable format.
We can quickly view the storage usage in a Linux system using the above command.