Check Linux File System Size
To view the size of the file system in a Linux system, you can use the following command:
- Use the df command to view the size of the entire file system.
df -h
This command will display the size, used space, available space, and mount point of all mounted file systems.
- Use the “du” command to check the size of a specific directory.
du -h <目录路径>
This command will display the size of the specified directory and its subdirectories.
- Check the size of files or directories using the ls command.
ls -l
This command will display detailed information about a file or directory, including its size.
With these commands, you can easily view the size of the file system as well as the size of individual files or directories, which can help manage disk space.