Last update at :2024-05-10,Edit by888u
Source: https://opensource.com/article/18/7/how-check-free-disk-space-linux
If one day you find that your VPS’s hard drive seems to be insufficient, you may consider referring to this article.
df
The df command means "disk-free" and displays the available and used disk space on a Linux system.
df -h displays disk space in human-readable format.
df -a displays the complete disk usage of the file system, even if the Available field is 0.
df -T displays disk usage and the file system type for each block (for example, xfs, ext2, ext3, btrfs, etc.).
df -i displays used and unused inodes.
du
du displays disk usage of files, directories, etc., in kb by default.
du -h displays the disk usage of all directories and subdirectories in human-readable form. It is recommended to run it in the root directory, which is more intuitive.
du -a displays disk usage for all files.
du -s provides the total disk space used by a specific file or directory.
ls -al
ls -al lists the entire contents and size of a specific directory.
stat
stat
fdisk -l
fdisk -l displays disk size and disk partition information.
Recommended site searches: foreign website space, US host ranking, registration-free virtual host, domain name price, ip proxy, shopex space, domain name registration query, virtual host application, server high defense Hong Kong, cn domain name, < /p>
发表评论