Both Linux and Unix provide a number of tools to view the size of disk space.
1. DF command, DF Command, can see the size of the current file system occupied space, as well as the remaining size, the following example:
filesystem 1k-blocks used Available Use% Mounted on/dev/loop0 18761008 15246876 2554440 86%/none 4 0 4 0%/sys/fs/cgroupudev 493812 4 493808 1%/devtmpfs 100672 1364 99308 2%/runnone 5120 0 5120 0%/Run/locknone 503352 1764 501588 1%/run/shmnone 102400 20 102380 1%/run/user/dev/sda3 174766076 164417964 10348112 95%/ Host
The above result is the direct input DF display results, if you want to see the image, you can add the-h parameter, as follows:
filesystem size used Avail use% mounted on/dev/loop0 18g 15g 2.5g 86%/none 4.0k 0 4.0k 0%/sys/fs/cgroupudev 483m 4.0k 483m 1%/devtmpfs 99m 1.4m 97m 2%/runnone 5.0m 0 5.0m 0%/ run/locknone 492M 1.8M 490M 1%/run/shmnone 100M 20K 100m 1%/run/user/dev/sda3 167g 157G 9.9g 95%/host
2. The second very useful command is DU, which displays the amount of space occupied by the current file, using: "du [filename]", as follows:
8.0K file1.txt8.0k file2.txt10.0k file3.txt2.0k file4.txt8.0k file5.txt8.0k file6.txt44.0k Total
Note that the effect is also to add the-h parameter to the input after Du.
How to see how much disk space is on Linux