首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

Linux下 df 命令查看磁盘空间

Linux下 df 命令查看磁盘空间

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

df

Filesystem     1K-blocks     Used Available Use% Mounted on
udev             8123336        0   8123336   0% /dev
tmpfs            1630560     1896   1628664   1% /run
/dev/sda6        9545920  7380424   1660872  82% /
tmpfs            8152792    29944   8122848   1% /dev/shm
tmpfs               5120        4      5116   1% /run/lock
tmpfs            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/loop7          2304     2304         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         2432     2432         0 100% /snap/gnome-calculator/180
/dev/loop10         3840     3840         0 100% /snap/gnome-system-monitor/51
/dev/loop11         3840     3840         0 100% /snap/gnome-system-monitor/57
/dev/loop14         2304     2304         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    75294     95388  45% /boot
tmpfs            1630556       20   1630536   1% /run/user/121
tmpfs            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, --inodes          list inode information instead of block usage
  -k                    like --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, --portability     use 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-type      print file system type
  -x, --exclude-type=TYPE   limit listing to file systems not of type TYPE
  -v                    (ignored)
      --help     display this help and exit
      --version  output version information and exit

Display 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.  Valid
field names are: 'source', 'fstype', 'itotal', 'iused', 'iavail', 'ipcent',
'size', 'used', 'avail', 'pcent', 'file' and 'target' (see info page).

GNU coreutils online help: <http://www.gnu.org/software/coreutils/&gt;
Full documentation at: <http://www.gnu.org/software/coreutils/df&gt;
or available locally via: info '(coreutils) df invocation'

   
以MB为块的大小查看
返回列表