AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1271340
Accepted
RostenRoss
RostenRoss
Asked: 2020-08-31 07:52:04 +0800 CST2020-08-31 07:52:04 +0800 CST 2020-08-31 07:52:04 +0800 CST

终端:du -sm [重复]

  • 772
这个问题在这里已经有了答案:
如何有效地使用手册页? (3 个回答)
2年前关闭。

我必须为我的大学完成一些活动,我需要知道命令是什么du -sm。我已经在很多网站上搜索过,但我没有找到答案。
你可以帮帮我吗?

command-line du
  • 2 2 个回答
  • 809 Views

2 个回答

  • Voted
  1. Best Answer
    totalynotanoob
    2020-08-31T07:57:41+08:002020-08-31T07:57:41+08:00

    man您可以使用以下方式阅读此类内容

    man du
    

    那里说

    du - 估计文件空间使用情况

    -m
    像 --block-size=1M

    -B,--块大小=大小

    在打印之前按 SIZE 缩放尺寸;例如,“-BM”以 1,048,576 字节为单位打印大小;请参阅下面的 SIZE 格式

    -s, --summarize 仅显示每个参数的总数

    单个-通常表示单个字符参数,--也可以是整个单词。所以当一个字符后面有多个字符时,-它通常是一个组合

    • 1
  2. kabr8
    2020-08-31T07:57:01+08:002020-08-31T07:57:01+08:00

    我在 Wikipedia 上找到了这个,或者你可以使用

    du --help
    

    获取有关命令的信息。

    帮助命令内容:

    Usage: du [OPTION]... [FILE]...
      or:  du [OPTION]... --files0-from=F
    Summarize disk usage of the set of FILEs, recursively for directories.
    
    Mandatory arguments to long options are mandatory for short options too.
      -0, --null            end each output line with NUL, not newline
      -a, --all             write counts for all files, not just directories
          --apparent-size   print apparent sizes, rather than disk usage; although
                              the apparent size is usually smaller, it may be
                              larger due to holes in ('sparse') files, internal
                              fragmentation, indirect blocks, and the like
      -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
      -b, --bytes           equivalent to '--apparent-size --block-size=1'
      -c, --total           produce a grand total
      -D, --dereference-args  dereference only symlinks that are listed on the
                              command line
      -d, --max-depth=N     print the total for a directory (or file, with --all)                                                                                                                                                                                                  
                              only if it is N or fewer levels below the command                                                                                                                                                                                                    
                              line argument;  --max-depth=0 is the same as                                                                                                                                                                                                         
                              --summarize                                                                                                                                                                                                                                          
          --files0-from=F   summarize disk usage of the                                                                                                                                                                                                                            
                              NUL-terminated file names specified in file F;                                                                                                                                                                                                       
                              if F is -, then read names from standard input                                                                                                                                                                                                       
      -H                    equivalent to --dereference-args (-D)                                                                                                                                                                                                                  
      -h, --human-readable  print sizes in human readable format (e.g., 1K 234M 2G)                                                                                                                                                                                                
          --inodes          list inode usage information instead of block usage                                                                                                                                                                                                    
      -k                    like --block-size=1K                                                                                                                                                                                                                                   
      -L, --dereference     dereference all symbolic links                                                                                                                                                                                                                         
      -l, --count-links     count sizes many times if hard linked                                                                                                                                                                                                                  
      -m                    like --block-size=1M                                                                                                                                                                                                                                   
      -P, --no-dereference  don't follow any symbolic links (this is the default)                                                                                                                                                                                                  
      -S, --separate-dirs   for directories do not include size of subdirectories                                                                                                                                                                                                  
          --si              like -h, but use powers of 1000 not 1024                                                                                                                                                                                                               
      -s, --summarize       display only a total for each argument                                                                                                                                                                                                                 
      -t, --threshold=SIZE  exclude entries smaller than SIZE if positive,                                                                                                                                                                                                         
                              or entries greater than SIZE if negative                                                                                                                                                                                                             
          --time            show time of the last modification of any file in the                                                                                                                                                                                                  
                              directory, or any of its subdirectories                                                                                                                                                                                                              
          --time=WORD       show time as WORD instead of modification time:                                                                                                                                                                                                        
                              atime, access, use, ctime or status
          --time-style=STYLE  show times using STYLE, which can be:
                                full-iso, long-iso, iso, or +FORMAT;
                                FORMAT is interpreted like in 'date'
      -X, --exclude-from=FILE  exclude files that match any pattern in FILE
          --exclude=PATTERN    exclude files that match PATTERN
      -x, --one-file-system    skip directories on different file systems
          --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 DU_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).
    
    GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
    Full documentation at: <http://www.gnu.org/software/coreutils/du>
    or available locally via: info '(coreutils) du invocation'
    
    
    • 0

相关问题

  • 如何从命令行仅安装安全更新?关于如何管理更新的一些提示

  • 如何从命令行刻录双层 dvd iso

  • 如何从命令行判断机器是否需要重新启动?

  • 文件权限如何工作?文件权限用户和组

  • 如何在 Vim 中启用全彩支持?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve