• [Linux] 磁盘使用情况查看


    linux中df命令的功能是用来检查linux服务器的文件系统的磁盘空间占用情况。可以利用该命令来获取硬盘被占用了多少空间,目前还剩下多少空间等信息。

    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 dummy 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
      --direct show statistics for a file instead of mount point
      --total produce a grand total
    -h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)
    -H, --si likewise, but use powers of 1000 not 1024
    -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) 忽略 sync 命令
      --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 在取得磁盘信息前,先执行sync命令
    -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).

    SIZE is an integer and optional unit (example: 10M is 10*1024*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/>
    For complete documentation, run: info coreutils 'df invocation'

  • 相关阅读:
    基本数据类型与其包装类型
    String与常量池(JDK1.8)
    数据库知识归纳(面试向)
    HashMap、ConcurrentHashMap以及HashTable(面试向)
    Java多线程基础(面试向)
    Java的类加载
    Sql语句的一些事(二)
    RUBY惯用方法(转)
    Ruby中区分运行来源的方法(转)
    ruby安装devkit
  • 原文地址:https://www.cnblogs.com/xiaofeiIDO/p/6422901.html
Copyright © 2020-2023  润新知