Notes
1.0.0
1.0.0
  • Introduction
  • Commands
    • cd
    • df
    • du
    • fc-cahe
    • ifconfig
    • ip
    • ls
    • lsb_release
    • mkdir
    • mksquashfs
    • mount
    • ping
    • pwd
    • rm
    • sar
    • sudo
  • Linux C
    • Preprocessor
    • Keywords
    • Kernel
      • Ftrace
      • Watchdog
  • Python
    • general
      • Decorator
      • Generator
      • Iterator
      • Lambda
    • Download
    • NIC
  • Network
    • Protocol
      • Link layer
      • IP
      • ARP
      • ICMP
    • Proxy
      • Cntlm
      • Proxychains4
      • ShadowSocks
    • Tools
      • iperf
      • tc
      • Wireshark
    • Apps
      • samba
      • tftp
  • Software
    • Atom
    • Chrome
    • Docker
    • Git
    • Gitbook
    • Hexo
    • Nodejs
    • Teraterm
    • Tex
    • Tmux
    • VIM
    • VSCode
  • Database
    • MongoDB
  • Web
    • CSS
    • LNMP
  • Tools
    • common
    • programming
  • Ubuntu
    • Add user
    • AWS EC2
    • FAQ
    • Installer
    • Shell
    • Shell scripts
    • Themes
    • VPS
  • Windows
    • PowerShell
    • CMD
    • FAQ
  • Aphorisms
  • Book List
  • Favorites
  • Appendix
    • ASCII
    • GSM
Powered by GitBook
On this page
  • usage
  • examples

Was this helpful?

  1. Commands

du

Disk Usage

usage

➜  du -<TAB>
--all               -a      -- write counts for all files
--apparent-size             -- print apparent sizes rather than disc usage
--block-size        -B      -- specify block size
--bytes             -b      -- equivalent to --apparent-size --block-size=1
--count-links       -l      -- count sizes many times if hard linked
--dereference       -L      -- dereference all symlinks
--dereference-args  -D  -H  -- dereference arguments that are symlinks
--exclude                   -- exclude files matching pattern
--exclude-from      -X      -- exclude files matching any pattern in file
--files0-from               -- use NUL-terminated list of files from file
--help                      -- display help information
--human-readable    -h      -- print sizes in human readable format
-k                          -- use block size of 1k
-m                          -- use block size of 1M
--max-depth                 -- maximum levels to recurse
--no-dereference    -P      -- do not dereference any symlinks
--null              -0      -- end each output line with NUL instead of newline
--one-file-system   -x      -- skip directories on different filesystems
--separate-dirs     -S      -- do not include size of subdirectories
--si                        -- human readable form using powers of 1000
--summarize         -s      -- only report total for each argument
--threshold         -t      -- report only entries for which size exceeds threshold
--time                      -- show time of last modification of any file in the directory
--time-style                -- show times using given style, +FORMAT for strftime formatted args
--total             -c      -- produce a grand total
--version                   -- display version information

examples

du # 显示当前目录所有文件大小明细
du -s # 显示当前目录总占用空间
du -h # 显示当前目录所有文件大小明细,显示单位
du -sh # 查看当前目录占用空间,显示单位
PreviousdfNextfc-cahe

Last updated 5 years ago

Was this helpful?