新聞中心
Modern linux systems have a wealth of tools available to help users understand their disk usage and query the status of their filesystems. One of the simplest and most commonly used commands is the `df` command, which displays the total size, used and available space and the usage percentage of all mounted filesystems.

成都創(chuàng)新互聯(lián)公司堅持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:網(wǎng)站建設(shè)、做網(wǎng)站、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿足客戶于互聯(lián)網(wǎng)時代的西鄉(xiāng)塘網(wǎng)站設(shè)計、移動媒體設(shè)計的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!
In its simplest form the `df` command can be run without any arguments and it will display the disk usage information for all filesystems currently mounted. An example is shown below which is run on a standard Ubuntu Linux distribution.
“`console
$ df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 4915212 0 4915212 0% /dev
tmpfs 1007664 90508 917156 9% /run
/dev/sda1 70372788 37401620 27054108 54% /
On the output, the `Filesystem` field shows the name of the mounted filesystem, e.g. `/dev/sda1`, the `1K-blocks` field shows the total size of the filesystem, `Used` field shows the used space, `Available` field shows the available space and the `Use%` field shows the used percentage. It's worth pointing out that the `Use%` is calculated differently than `Used` divided by `Size` in that it is based on the amount of data that can be stored in the available space.
Using the `-h` option with the `df` command makes the output more human readable by displaying values in a more standard byte size format. This can be very handy when dealing with large filesystems.
```console
$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 5G 0 5G 0% /dev
tmpfs 1.0G 90M 917M 9% /run
/dev/sda1 68G 37G 27G 54% /
Finally the `-a` argument will display all mounted filesystems, including pseudo filesystems such as `/dev`, `/sys`, `/proc` and `/run`.
“`console
$ df -ah
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 68G 37G 27G 54% /
udev 5G 0 5G 0% /dev
tmpfs 1.0G 90M 917M 9% /run
/dev/shm 902M 76K 902M 1% /dev/shm
/run/lock 902M 0 902M 0% /run/lock
/sys/fs/cgroup 902M 12K 902M 1% /sys/fs/cgroup
/run/user/1000 902M 48K 902M 1% /run/user/1000
The `df` command is just one of the many useful tools available to query the state and usage of filesystems on a modern Linux system. As always, it's good practice to periodically review your disk usage to keep it within acceptable limits and to identify any potential problems before they become serious.
香港服務(wù)器選創(chuàng)新互聯(lián),2H2G首月10元開通。
創(chuàng)新互聯(lián)(www.cdcxhl.com)互聯(lián)網(wǎng)服務(wù)提供商,擁有超過10年的服務(wù)器租用、服務(wù)器托管、云服務(wù)器、虛擬主機(jī)、網(wǎng)站系統(tǒng)開發(fā)經(jīng)驗(yàn)。專業(yè)提供云主機(jī)、虛擬主機(jī)、域名注冊、VPS主機(jī)、云服務(wù)器、香港云服務(wù)器、免備案服務(wù)器等。
網(wǎng)站題目:率Linux查看磁盤使用率:一步到位(linux查詢磁盤占用)
分享網(wǎng)址:http://www.5511xx.com/article/coiejei.html


咨詢
建站咨詢
