How to see how much disk space is on Linux

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.