https://opensource.com/article/18/7/how-check-free-disk-space-linux
Keep track of disk utilization with this handy list of commands.
Keeping
track of disk utilization information is on system administrators' (and
others') daily to-do list. Linux has a few built-in utilities that help
provide that information.
The following commands will check your total space and your utilized space.
These are most of the built-in utilities for checking file space in Linux. There are many similar tools, like Disks (GUI), Ncdu, etc., that also show disk space utilization. Do you have a favorite tool that's not on this list? Please share in the comments.
df
Thedf
command stands for "disk-free," and shows available and used disk space on the Linux system.df -h
shows disk space in human-readable formatdf -a
shows the file system's complete disk usage even if the Available field is 0df -T
shows the disk usage along with each block's filesystem type (e.g., xfs, ext2, ext3, btrfs, etc.)df -i
shows used and free inodesdu
du
shows the disk usage of files, folders, etc. in the default kilobyte sizedu -h
shows disk usage in human-readable format for all directories and subdirectoriesdu -a
shows disk usage for all filesdu -s
provides total disk space used by a particular file or directoryThe following commands will check your total space and your utilized space.
ls -al
ls -al
lists the entire contents, along with their size, of a particular directorystat
stat
displays the size and other stats of a file/directory or a filesystem.fdisk -l
fdisk -l
shows disk size along with disk partitioning informationThese are most of the built-in utilities for checking file space in Linux. There are many similar tools, like Disks (GUI), Ncdu, etc., that also show disk space utilization. Do you have a favorite tool that's not on this list? Please share in the comments.
No comments:
Post a Comment