1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > Linux下 df 命令查看磁盘空间

Linux下 df 命令查看磁盘空间

时间:2022-01-19 10:51:52

相关推荐

Linux下 df 命令查看磁盘空间

Linux下可以用 df 命令查看磁盘空间

df

Filesystem1K-blocksUsed Available Use% Mounted onudev 8123336 0 8123336 0% /devtmpfs 16305601896 1628664 1% /run/dev/sda6 9545920 7380424 1660872 82% /tmpfs 8152792 29944 8122848 1% /dev/shmtmpfs5120 45116 1% /run/locktmpfs 8152792 0 8152792 0% /sys/fs/cgroup/dev/loop0 13312 13312 0 100% /snap/gnome-characters/139/dev/loop2 14848 14848 0 100% /snap/gnome-logs/37/dev/loop1 144128 144128 0 100% /snap/gnome-3-26-1604/74/dev/loop4 14976 14976 0 100% /snap/gnome-logs/45/dev/loop6 35072 35072 0 100% /snap/gtk-common-themes/808/dev/loop723042304 0 100% /snap/gnome-calculator/238/dev/loop8 13312 13312 0 100% /snap/gnome-characters/103/dev/loop13 35456 35456 0 100% /snap/gtk-common-themes/818/dev/loop15 13312 13312 0 100% /snap/gnome-characters/124/dev/loop16 144384 144384 0 100% /snap/gnome-3-26-1604/70/dev/loop17 24322432 0 100% /snap/gnome-calculator/180/dev/loop10 38403840 0 100% /snap/gnome-system-monitor/51/dev/loop11 38403840 0 100% /snap/gnome-system-monitor/57/dev/loop14 23042304 0 100% /snap/gnome-calculator/260/dev/loop9 90368 90368 0 100% /snap/core/5897/dev/loop12 43264 43264 0 100% /snap/gtk-common-themes/701/dev/loop3 91648 91648 0 100% /snap/core/6130/dev/loop5 91648 91648 0 100% /snap/core/6034/dev/sda7 15931832 10549072 4553732 70% /home/dev/sda5 184301 7529495388 45% /boottmpfs 1630556 20 1630536 1% /run/user/121tmpfs 1630556 56 1630500 1% /run/user/1000

查看帮助

df --help

Usage: df [OPTION]... [FILE]...Show information about the file system on which each FILE resides,or all file systems by default.Mandatory arguments to long options are mandatory for short options too.-a, --all include pseudo, duplicate, inaccessible file systems-B, --block-size=SIZE scale sizes by SIZE before printing them; e.g.,'-BM' prints sizes in units of 1,048,576 bytes;see SIZE format below-h, --human-readable print sizes in powers of 1024 (e.g., 1023M)-H, --si print sizes in powers of 1000 (e.g., 1.1G)-i, --inodeslist inode information instead of block usage-klike --block-size=1K-l, --local limit listing to local file systems--no-sync do not invoke sync before getting usage info (default)--output[=FIELD_LIST] use the output format defined by FIELD_LIST,or print all fields if FIELD_LIST is omitted.-P, --portabilityuse the POSIX output format--sync invoke sync before getting usage info--total elide all entries insignificant to available space,and produce a grand total-t, --type=TYPE limit listing to file systems of type TYPE-T, --print-typeprint file system type-x, --exclude-type=TYPE limit listing to file systems not of type TYPE-v(ignored)--helpdisplay this help and exit--version output version information and exitDisplay values are in units of the first available SIZE from --block-size,and the DF_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables.Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).The SIZE argument is an integer and optional unit (example: 10K is 10*1024).Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000).FIELD_LIST is a comma-separated list of columns to be included. Validfield names are: 'source', 'fstype', 'itotal', 'iused', 'iavail', 'ipcent','size', 'used', 'avail', 'pcent', 'file' and 'target' (see info page).GNU coreutils online help: </software/coreutils/>Full documentation at: </software/coreutils/df>or available locally via: info '(coreutils) df invocation'

以MB为块的大小查看

df -m

Filesystem1M-blocks Used Available Use% Mounted onudev793307933 0% /devtmpfs159321591 1% /run/dev/sda6 9323 72081622 82% /tmpfs7962 297934 1% /dev/shmtmpfs 51 5 1% /run/locktmpfs796207962 0% /sys/fs/cgroup/dev/loop0 13 13 0 100% /snap/gnome-characters/139/dev/loop2 15 15 0 100% /snap/gnome-logs/37/dev/loop1 141 141 0 100% /snap/gnome-3-26-1604/74/dev/loop4 15 15 0 100% /snap/gnome-logs/45/dev/loop6 35 35 0 100% /snap/gtk-common-themes/808/dev/loop7 33 0 100% /snap/gnome-calculator/238/dev/loop8 13 13 0 100% /snap/gnome-characters/103/dev/loop13 35 35 0 100% /snap/gtk-common-themes/818/dev/loop15 13 13 0 100% /snap/gnome-characters/124/dev/loop16141 141 0 100% /snap/gnome-3-26-1604/70/dev/loop17 33 0 100% /snap/gnome-calculator/180/dev/loop10 44 0 100% /snap/gnome-system-monitor/51/dev/loop11 44 0 100% /snap/gnome-system-monitor/57/dev/loop14 33 0 100% /snap/gnome-calculator/260/dev/loop9 89 89 0 100% /snap/core/5897/dev/loop12 43 43 0 100% /snap/gtk-common-themes/701/dev/loop3 90 90 0 100% /snap/core/6130/dev/loop5 90 90 0 100% /snap/core/6034/dev/sda715559 103034447 70% /home/dev/sda5 180 74 94 45% /boottmpfs159311593 1% /run/user/121tmpfs159311593 1% /run/user/1000

以人性化的方式查看

df -h

FilesystemSize Used Avail Use% Mounted onudev 7.8G0 7.8G 0% /devtmpfs 1.6G 1.9M 1.6G 1% /run/dev/sda6 9.2G 7.1G 1.6G 82% /tmpfs 7.8G 29M 7.8G 1% /dev/shmtmpfs 5.0M 4.0K 5.0M 1% /run/locktmpfs 7.8G0 7.8G 0% /sys/fs/cgroup/dev/loop0 13M 13M0 100% /snap/gnome-characters/139/dev/loop2 15M 15M0 100% /snap/gnome-logs/37/dev/loop1141M 141M0 100% /snap/gnome-3-26-1604/74/dev/loop4 15M 15M0 100% /snap/gnome-logs/45/dev/loop6 35M 35M0 100% /snap/gtk-common-themes/808/dev/loop72.3M 2.3M0 100% /snap/gnome-calculator/238/dev/loop8 13M 13M0 100% /snap/gnome-characters/103/dev/loop1335M 35M0 100% /snap/gtk-common-themes/818/dev/loop1513M 13M0 100% /snap/gnome-characters/124/dev/loop16141M 141M0 100% /snap/gnome-3-26-1604/70/dev/loop172.4M 2.4M0 100% /snap/gnome-calculator/180/dev/loop103.8M 3.8M0 100% /snap/gnome-system-monitor/51/dev/loop113.8M 3.8M0 100% /snap/gnome-system-monitor/57/dev/loop142.3M 2.3M0 100% /snap/gnome-calculator/260/dev/loop9 89M 89M0 100% /snap/core/5897/dev/loop1243M 43M0 100% /snap/gtk-common-themes/701/dev/loop3 90M 90M0 100% /snap/core/6130/dev/loop5 90M 90M0 100% /snap/core/6034/dev/sda7 16G 11G 4.4G 70% /home/dev/sda5 180M 74M 94M 45% /boottmpfs 1.6G 20K 1.6G 1% /run/user/121tmpfs 1.6G 56K 1.6G 1% /run/user/1000

查看某一路径,如/home

df -h /home

FilesystemSize Used Avail Use% Mounted on/dev/sda7 16G 11G 4.4G 70% /home

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。