-h 文件单位, 以 兆 G 字节,显示

  1. [命令解析]
  2. : -h 文件大小显示, 默认字节, 此命令以 M G 显示
  3. # ls -h
  4. -h, --human-readable with -l, print sizes in human readable format
  5. (e.g., 1K 234M 2G)
  6. --si likewise, but use powers of 1000 not 1024
  7. # ll -h
  8. -h, --human-readable with -l, print sizes in human readable format
  9. (e.g., 1K 234M 2G)
  10. --si likewise, but use powers of 1000 not 1024

ls —help & centos7

  1. [ls --help & centos7]
  2. Usage: ls [OPTION]... [FILE]...
  3. List information about the FILEs (the current directory by default).
  4. Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.
  5. Mandatory arguments to long options are mandatory for short options too.
  6. -a, --all do not ignore entries starting with .
  7. -A, --almost-all do not list implied . and ..
  8. --author with -l, print the author of each file
  9. -b, --escape print C-style escapes for nongraphic characters
  10. --block-size=SIZE scale sizes by SIZE before printing them; e.g.,
  11. '--block-size=M' prints sizes in units of
  12. 1,048,576 bytes; see SIZE format below
  13. -B, --ignore-backups do not list implied entries ending with ~
  14. -c with -lt: sort by, and show, ctime (time of last
  15. modification of file status information);
  16. with -l: show ctime and sort by name;
  17. otherwise: sort by ctime, newest first
  18. -C list entries by columns
  19. --color[=WHEN] colorize the output; WHEN can be 'never', 'auto',
  20. or 'always' (the default); more info below
  21. -d, --directory list directories themselves, not their contents
  22. -D, --dired generate output designed for Emacs' dired mode
  23. -f do not sort, enable -aU, disable -ls --color
  24. -F, --classify append indicator (one of */=>@|) to entries
  25. --file-type likewise, except do not append '*'
  26. --format=WORD across -x, commas -m, horizontal -x, long -l,
  27. single-column -1, verbose -l, vertical -C
  28. --full-time like -l --time-style=full-iso
  29. -g like -l, but do not list owner
  30. --group-directories-first
  31. group directories before files;
  32. can be augmented with a --sort option, but any
  33. use of --sort=none (-U) disables grouping
  34. -G, --no-group in a long listing, don't print group names
  35. -H, --dereference-command-line
  36. follow symbolic links listed on the command line
  37. --dereference-command-line-symlink-to-dir
  38. follow each command line symbolic link
  39. that points to a directory
  40. --hide=PATTERN do not list implied entries matching shell PATTERN
  41. (overridden by -a or -A)
  42. --indicator-style=WORD append indicator with style WORD to entry names:
  43. none (default), slash (-p),
  44. file-type (--file-type), classify (-F)
  45. -i, --inode print the index number of each file
  46. -I, --ignore=PATTERN do not list implied entries matching shell PATTERN
  47. -k, --kibibytes default to 1024-byte blocks for disk usage
  48. -l use a long listing format
  49. -L, --dereference when showing file information for a symbolic
  50. link, show information for the file the link
  51. references rather than for the link itself
  52. -m fill width with a comma separated list of entries
  53. -n, --numeric-uid-gid like -l, but list numeric user and group IDs
  54. -N, --literal print raw entry names (don't treat e.g. control
  55. characters specially)
  56. -o like -l, but do not list group information
  57. -p, --indicator-style=slash
  58. append / indicator to directories
  59. -q, --hide-control-chars print ? instead of nongraphic characters
  60. --show-control-chars show nongraphic characters as-is (the default,
  61. unless program is 'ls' and output is a terminal)
  62. -Q, --quote-name enclose entry names in double quotes
  63. --quoting-style=WORD use quoting style WORD for entry names:
  64. literal, locale, shell, shell-always, c, escape
  65. -r, --reverse reverse order while sorting
  66. -R, --recursive list subdirectories recursively
  67. -s, --size print the allocated size of each file, in blocks
  68. -S sort by file size
  69. --sort=WORD sort by WORD instead of name: none (-U), size (-S),
  70. time (-t), version (-v), extension (-X)
  71. --time=WORD with -l, show time as WORD instead of default
  72. modification time: atime or access or use (-u)
  73. ctime or status (-c); also use specified time
  74. as sort key if --sort=time
  75. --time-style=STYLE with -l, show times using style STYLE:
  76. full-iso, long-iso, iso, locale, or +FORMAT;
  77. FORMAT is interpreted like in 'date'; if FORMAT
  78. is FORMAT1<newline>FORMAT2, then FORMAT1 applies
  79. to non-recent files and FORMAT2 to recent files;
  80. if STYLE is prefixed with 'posix-', STYLE
  81. takes effect only outside the POSIX locale
  82. -t sort by modification time, newest first
  83. -T, --tabsize=COLS assume tab stops at each COLS instead of 8
  84. -u with -lt: sort by, and show, access time;
  85. with -l: show access time and sort by name;
  86. otherwise: sort by access time
  87. -U do not sort; list entries in directory order
  88. -v natural sort of (version) numbers within text
  89. -w, --width=COLS assume screen width instead of current value
  90. -x list entries by lines instead of by columns
  91. -X sort alphabetically by entry extension
  92. -1 list one file per line
  93. SELinux options:
  94. --lcontext Display security context. Enable -l. Lines
  95. will probably be too wide for most displays.
  96. -Z, --context Display security context so it fits on most
  97. displays. Displays only mode, user, group,
  98. security context and file name.
  99. --scontext Display only security context and file name.
  100. --help display this help and exit
  101. --version output version information and exit
  102. SIZE is an integer and optional unit (example: 10M is 10*1024*1024). Units
  103. are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB, ... (powers of 1000).
  104. Using color to distinguish file types is disabled both by default and
  105. with --color=never. With --color=auto, ls emits color codes only when
  106. standard output is connected to a terminal. The LS_COLORS environment
  107. variable can change the settings. Use the dircolors command to set it.
  108. Exit status:
  109. 0 if OK,
  110. 1 if minor problems (e.g., cannot access subdirectory),
  111. 2 if serious trouble (e.g., cannot access command-line argument).
  112. GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
  113. For complete documentation, run: info coreutils 'ls invocation'

ll —help & centos7

  1. [ll --help & centos7]
  2. [root@Thinxz dockerfile]# ll --help
  3. Usage: ls [OPTION]... [FILE]...
  4. List information about the FILEs (the current directory by default).
  5. Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.
  6. Mandatory arguments to long options are mandatory for short options too.
  7. -a, --all do not ignore entries starting with .
  8. -A, --almost-all do not list implied . and ..
  9. --author with -l, print the author of each file
  10. -b, --escape print C-style escapes for nongraphic characters
  11. --block-size=SIZE scale sizes by SIZE before printing them; e.g.,
  12. '--block-size=M' prints sizes in units of
  13. 1,048,576 bytes; see SIZE format below
  14. -B, --ignore-backups do not list implied entries ending with ~
  15. -c with -lt: sort by, and show, ctime (time of last
  16. modification of file status information);
  17. with -l: show ctime and sort by name;
  18. otherwise: sort by ctime, newest first
  19. -C list entries by columns
  20. --color[=WHEN] colorize the output; WHEN can be 'never', 'auto',
  21. or 'always' (the default); more info below
  22. -d, --directory list directories themselves, not their contents
  23. -D, --dired generate output designed for Emacs' dired mode
  24. -f do not sort, enable -aU, disable -ls --color
  25. -F, --classify append indicator (one of */=>@|) to entries
  26. --file-type likewise, except do not append '*'
  27. --format=WORD across -x, commas -m, horizontal -x, long -l,
  28. single-column -1, verbose -l, vertical -C
  29. --full-time like -l --time-style=full-iso
  30. -g like -l, but do not list owner
  31. --group-directories-first
  32. group directories before files;
  33. can be augmented with a --sort option, but any
  34. use of --sort=none (-U) disables grouping
  35. -G, --no-group in a long listing, don't print group names
  36. -H, --dereference-command-line
  37. follow symbolic links listed on the command line
  38. --dereference-command-line-symlink-to-dir
  39. follow each command line symbolic link
  40. that points to a directory
  41. --hide=PATTERN do not list implied entries matching shell PATTERN
  42. (overridden by -a or -A)
  43. --indicator-style=WORD append indicator with style WORD to entry names:
  44. none (default), slash (-p),
  45. file-type (--file-type), classify (-F)
  46. -i, --inode print the index number of each file
  47. -I, --ignore=PATTERN do not list implied entries matching shell PATTERN
  48. -k, --kibibytes default to 1024-byte blocks for disk usage
  49. -l use a long listing format
  50. -L, --dereference when showing file information for a symbolic
  51. link, show information for the file the link
  52. references rather than for the link itself
  53. -m fill width with a comma separated list of entries
  54. -n, --numeric-uid-gid like -l, but list numeric user and group IDs
  55. -N, --literal print raw entry names (don't treat e.g. control
  56. characters specially)
  57. -o like -l, but do not list group information
  58. -p, --indicator-style=slash
  59. append / indicator to directories
  60. -q, --hide-control-chars print ? instead of nongraphic characters
  61. --show-control-chars show nongraphic characters as-is (the default,
  62. unless program is 'ls' and output is a terminal)
  63. -Q, --quote-name enclose entry names in double quotes
  64. --quoting-style=WORD use quoting style WORD for entry names:
  65. literal, locale, shell, shell-always, c, escape
  66. -r, --reverse reverse order while sorting
  67. -R, --recursive list subdirectories recursively
  68. -s, --size print the allocated size of each file, in blocks
  69. -S sort by file size
  70. --sort=WORD sort by WORD instead of name: none (-U), size (-S),
  71. time (-t), version (-v), extension (-X)
  72. --time=WORD with -l, show time as WORD instead of default
  73. modification time: atime or access or use (-u)
  74. ctime or status (-c); also use specified time
  75. as sort key if --sort=time
  76. --time-style=STYLE with -l, show times using style STYLE:
  77. full-iso, long-iso, iso, locale, or +FORMAT;
  78. FORMAT is interpreted like in 'date'; if FORMAT
  79. is FORMAT1<newline>FORMAT2, then FORMAT1 applies
  80. to non-recent files and FORMAT2 to recent files;
  81. if STYLE is prefixed with 'posix-', STYLE
  82. takes effect only outside the POSIX locale
  83. -t sort by modification time, newest first
  84. -T, --tabsize=COLS assume tab stops at each COLS instead of 8
  85. -u with -lt: sort by, and show, access time;
  86. with -l: show access time and sort by name;
  87. otherwise: sort by access time
  88. -U do not sort; list entries in directory order
  89. -v natural sort of (version) numbers within text
  90. -w, --width=COLS assume screen width instead of current value
  91. -x list entries by lines instead of by columns
  92. -X sort alphabetically by entry extension
  93. -1 list one file per line
  94. SELinux options:
  95. --lcontext Display security context. Enable -l. Lines
  96. will probably be too wide for most displays.
  97. -Z, --context Display security context so it fits on most
  98. displays. Displays only mode, user, group,
  99. security context and file name.
  100. --scontext Display only security context and file name.
  101. --help display this help and exit
  102. --version output version information and exit
  103. SIZE is an integer and optional unit (example: 10M is 10*1024*1024). Units
  104. are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB, ... (powers of 1000).
  105. Using color to distinguish file types is disabled both by default and
  106. with --color=never. With --color=auto, ls emits color codes only when
  107. standard output is connected to a terminal. The LS_COLORS environment
  108. variable can change the settings. Use the dircolors command to set it.
  109. Exit status:
  110. 0 if OK,
  111. 1 if minor problems (e.g., cannot access subdirectory),
  112. 2 if serious trouble (e.g., cannot access command-line argument).
  113. GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
  114. For complete documentation, run: info coreutils 'ls invocation'