linux下查看磁碟剩餘空間和檔案夾大小的方法

來源:互聯網
上載者:User
df -hl 查看磁碟剩餘空間  du -sm 檔案夾 返回該檔案夾總M數 更多功能查看: df --help即df的man手冊 用法:du [選項]... [檔案]... 總結每個檔案的磁碟用量,目錄則取總用量。 長選項必須用的參數在使用短選項時也是必須的。 
  1. df -hl 查看磁碟剩餘空間
  2. du -sm 檔案夾
  3. 返回該檔案夾總M數
  4. 更多功能查看:
  5. df --help
  6. du --help
  7. du --help
  8. 用法:du [選項]... [檔案]...
  9. 總結每個<檔案>的磁碟用量,目錄則取總用量。
  10. 長選項必須用的參數在使用短選項時也是必須的。
  11. -a, --all             write counts for all files, not just directories
  12.       --apparent-size   print apparent sizes, rather than disk usage; although
  13.                           the apparent size is usually smaller, it may be
  14.                           larger due to holes in (`sparse') files, internal
  15.                           fragmentation, indirect blocks, and the like
  16. -B, --block-size=SIZE use SIZE-byte blocks
  17. -b, --bytes           equivalent to `--apparent-size --block-size=1'
  18. -c, --total           produce a grand total
  19. -D, --dereference-args dereference FILEs that are symbolic links
  20. -H                    like --si, but also evokes a warning; will soon
  21.                         change to be equivalent to --dereference-args (-D)
  22. -h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)
  23.       --si              like -h, but use powers of 1000 not 1024
  24. -k                    like --block-size=1K
  25. -l, --count-links     count sizes many times if hard linked
  26. -L, --dereference     dereference all symbolic links
  27. -P, --no-dereference don't follow any symbolic links (this is the default)
  28. -0, --null            end each output line with 0 byte rather than newline
  29. -S, --separate-dirs   do not include size of subdirectories
  30. -s, --summarize       display only a total for each argument
  31. -x, --one-file-system skip directories on different filesystems
  32. -X FILE, --exclude-from=FILE Exclude files that match any pattern in FILE.
  33.       --exclude=PATTERN Exclude files that match PATTERN.
  34.       --max-depth=N     print the total for a directory (or file, with --all)
  35.                           only if it is N or fewer levels below the command
  36.                           line argument; --max-depth=0 is the same as
  37.                           --summarize
  38.       --help     顯示此協助資訊並離開
  39.       --version 顯示版本資訊並離開
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.