一 选项帮助
命令 --help
获取命令选项的帮助
例如
ls --help
二 shell内部命令帮助
help shell内部命令帮助
获取shell内部命令帮助
例如:
whereis cd
确实是否是shell内部命令
help cd
获取内部命令帮助
三 详细命令帮助info
四 实战
[root@localhost test]# ls --help
Usage: ls [OPTION]... [FILE]...
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.
Mandatory arguments to long options are mandatory for short options too.
-a, --all do not ignore entries starting with .
-A, --almost-all do not list implied . and ..
--author with -l, print the author of each file
-b, --escape print C-style escapes for nongraphic characters
--block-size=SIZE scale sizes by SIZE before printing them; e.g.,
'--block-size=M' prints sizes in units of
1,048,576 bytes; see SIZE format below
-B, --ignore-backups do not list implied entries ending with ~
-c with -lt: sort by, and show, ctime (time of last
modification of file status information);
with -l: show ctime and sort by name;
otherwise: sort by ctime, newest first
-C list entries by columns
--color[=WHEN] colorize the output; WHEN can be 'never', 'auto',
or 'always' (the default); more info below
-d, --directory list directories themselves, not their contents
-D, --dired generate output designed for Emacs' dired mode
-f do not sort, enable -aU, disable -ls --color
-F, --classify append indicator (one of */=>@|) to entries
--file-type likewise, except do not append '*'
--format=WORD across -x, commas -m, horizontal -x, long -l,
single-column -1, verbose -l, vertical -C
--full-time like -l --time-style=full-iso
-g like -l, but do not list owner
--group-directories-first
group directories before files;
can be augmented with a --sort option, but any
use of --sort=none (-U) disables grouping
-G, --no-group in a long listing, don't print group names
-h, --human-readable with -l, print sizes in human readable format
(e.g., 1K 234M 2G)
--si likewise, but use powers of 1000 not 1024
-H, --dereference-command-line
follow symbolic links listed on the command line
--dereference-command-line-symlink-to-dir
follow each command line symbolic link
that points to a directory
--hide=PATTERN do not list implied entries matching shell PATTERN
(overridden by -a or -A)
--indicator-style=WORD append indicator with style WORD to entry names:
none (default), slash (-p),
file-type (--file-type), classify (-F)
-i, --inode print the index number of each file
-I, --ignore=PATTERN do not list implied entries matching shell PATTERN
-k, --kibibytes default to 1024-byte blocks for disk usage
-l use a long listing format
-L, --dereference when showing file information for a symbolic
link, show information for the file the link
references rather than for the link itself
-m fill width with a comma separated list of entries
-n, --numeric-uid-gid like -l, but list numeric user and group IDs
-N, --literal print raw entry names (don't treat e.g. control
characters specially)
-o like -l, but do not list group information
-p, --indicator-style=slash
append / indicator to directories
-q, --hide-control-chars print ? instead of nongraphic characters
--show-control-chars show nongraphic characters as-is (the default,
unless program is 'ls' and output is a terminal)
-Q, --quote-name enclose entry names in double quotes
--quoting-style=WORD use quoting style WORD for entry names:
literal, locale, shell, shell-always, c, escape
-r, --reverse reverse order while sorting
-R, --recursive list subdirectories recursively
-s, --size print the allocated size of each file, in blocks
-S sort by file size
--sort=WORD sort by WORD instead of name: none (-U), size (-S),
time (-t), version (-v), extension (-X)
--time=WORD with -l, show time as WORD instead of default
modification time: atime or access or use (-u)
ctime or status (-c); also use specified time
as sort key if --sort=time
--time-style=STYLE with -l, show times using style STYLE:
full-iso, long-iso, iso, locale, or +FORMAT;
FORMAT is interpreted like in 'date'; if FORMAT
is FORMAT1<newline>FORMAT2, then FORMAT1 applies
to non-recent files and FORMAT2 to recent files;
if STYLE is prefixed with 'posix-', STYLE
takes effect only outside the POSIX locale
-t sort by modification time, newest first
-T, --tabsize=COLS assume tab stops at each COLS instead of 8
-u with -lt: sort by, and show, access time;
with -l: show access time and sort by name;
otherwise: sort by access time
-U do not sort; list entries in directory order
-v natural sort of (version) numbers within text
-w, --width=COLS assume screen width instead of current value
-x list entries by lines instead of by columns
-X sort alphabetically by entry extension
-1 list one file per line
SELinux options:
--lcontext Display security context. Enable -l. Lines
will probably be too wide for most displays.
-Z, --context Display security context so it fits on most
displays. Displays only mode, user, group,
security context and file name.
--scontext Display only security context and file name.
--help display this help and exit
--version output version information and exit
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).
Using color to distinguish file types is disabled both by default and
with --color=never. With --color=auto, ls emits color codes only when
standard output is connected to a terminal. The LS_COLORS environment
variable can change the settings. Use the dircolors command to set it.
Exit status:
0 if OK,
1 if minor problems (e.g., cannot access subdirectory),
2 if serious trouble (e.g., cannot access command-line argument).
GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
For complete documentation, run: info coreutils 'ls invocation'
[root@localhost test]# whereis ls
ls: /usr/bin/ls /usr/share/man/man1/ls.1.gz /usr/share/man/man1p/ls.1p.gz
[root@localhost test]# whereis cd
cd: /usr/bin/cd /usr/share/man/man1/cd.1.gz /usr/share/man/man1p/cd.1p.gz
[root@localhost test]# whereis pwd
pwd: /usr/bin/pwd /usr/include/pwd.h /usr/share/man/man1/pwd.1.gz /usr/share/man/man1p/pwd.1p.gz
[root@localhost test]# man cd
[root@localhost test]# help cd
cd: cd [-L|[-P [-e]]] [dir]
Change the shell working directory.
Change the current directory to DIR. The default DIR is the value of the
HOME shell variable.
The variable CDPATH defines the search path for the directory containing
DIR. Alternative directory names in CDPATH are separated by a colon (:).
A null directory name is the same as the current directory. If DIR begins
with a slash (/), then CDPATH is not used.
If the directory is not found, and the shell option `cdable_vars' is set,
the word is assumed to be a variable name. If that variable has a value,
its value is used for DIR.
Options:
-L force symbolic links to be followed
-P use the physical directory structure without following symbolic
links
-e if the -P option is supplied, and the current working directory
cannot be determined successfully, exit with a non-zero status
The default is to follow symbolic links, as if `-L' were specified.
Exit Status:
Returns 0 if the directory is changed, and if $PWD is set successfully when
-P is used; non-zero otherwise.
[root@localhost test]# info ls
相关推荐
在IT领域,Linux操作系统是开发者、系统管理员以及技术爱好者广泛使用的平台。它的强大之处在于其命令行界面,通过一系列简洁的命令,用户...在学习过程中,利用`man`命令随时查阅帮助文档,能快速提升你的Linux技能。
Linux帮助命令中文解释大全
04.4 Linux常用命令-文件搜索命令-帮助命令.mp4 04.5 Linux常用命令-文件搜索命令-用户管理命令.mp4 04.6 Linux常用命令-文件搜索命令-压缩解压命令.mp4 04.7 Linux常用命令-网络命令.mp4 04.8 Linux常用命令-...
这些壁纸将常见的Linux命令与精美的图像结合,每张壁纸上都清晰地标注了对应的中文注释,旨在帮助用户在日常使用中加深对命令的记忆。 Linux命令是操作系统的精髓,通过命令行界面(CLI)可以高效地执行各种任务,...
在Linux操作系统中,`ps`命令是一个非常基础且重要的工具,用于查看系统当前进程的状态。它的功能强大,能够提供各种不同的输出格式,帮助系统管理员监控和管理系统的运行情况。源码分析可以帮助我们深入理解`ps`...
除了上述命令,还有其他一些常用的Linux命令,如: **mkdir命令**:创建新目录,例如`mkdir myfolder` 创建名为myfolder的新目录。 **rm命令**:删除文件或目录,例如`rm file.txt` 删除file.txt文件,`rm -r ...
本文将详细解读《Linux命令大全完整版.pdf》中所收录的各类命令,以帮助读者更好地理解和运用Linux命令。 1. Linux系统管理命令 系统管理命令是Linux系统中最重要的命令类别之一,涵盖了用户管理、进程控制、系统...
这份“Linux命令帮助文档”包含了全面的Linux命令详解,旨在帮助用户深入理解和熟练运用各种Linux命令。 《雄鹰Linux教程》.chm文件很可能是对Linux系统的一个综合教程,可能涵盖了从基础到高级的各种主题,如文件...
下面是 Linux 中一些常用的命令,旨在帮助用户快速掌握 Linux 操作系统。 TTY 控制台终端 在 Linux 中,TTY(Teletypewriter)是指控制台终端,用户可以通过TTY终端来与系统进行交互。 pts 是虚拟终端,RHEL6 中有...
Linux 命令在系统中有两种类型:内置 Shell 命令和 Linux 命令。 控制台命令是指通过字符界面输入的可以操作系统的命令,例如 DOS 命令就是控制台命令。Linux 的命令(也包括文件名等等)对大小写是敏感的,也就是...
【标题】"Linux基础课件Linux的帮助命令共9页.pdf.zi" 提示我们这是一个关于...这个课程可能详细讲解了这些概念,并通过实例演示如何查找和使用Linux命令帮助,对于想要学习或提高Linux技能的人来说是一份宝贵的资源。
本资源“linux命令大全帮助手册”是Linux初学者和进阶者的一份宝贵资料,它涵盖了广泛的Linux命令和操作,旨在帮助用户熟练掌握在Linux环境中执行任务的技能。 首先,文件传输是Linux日常操作的基础,包括`cp`...
"Linux用户管理命令详解" Linux 操作系统中,用户管理是非常重要的一方面,用户的创建、修改、...Linux 创建用户命令是非常重要的系统管理命令,它们可以帮助我们更好地管理用户和用户组,从而确保系统的安全和稳定。
18. 命令帮助: - 命令 --help:获取指定命令的帮助信息。 - man 命令:以手册页形式提供命令的详细帮助信息。 19. 查看文件内容命令: - cat 文件名:查看文件的全部内容。 - cat -b 文件名:对非空白行编号,...
Linux操作系统是开源且多用户的一...这些命令构成了Linux系统管理的基础,熟练掌握它们能帮助用户高效地进行文件操作、系统维护及网络交互等工作。在日常使用中,可以结合man手册进一步学习每个命令的详细用法和选项。
安装和登录命令包括 login、shutdown、halt、reboot、install、mount、umount、chsh、exit、last 等,都是 Linux 系统中最基本和最重要的命令。 login 命令的作用是登录系统,它的使用权限是所有用户。login 命令的...
Linux 中常用的 shell 命令实验 Linux 操作系统中,shell 命令是最基本也是最重要的命令之一。掌握这些命令可以帮助用户更好地使用 Linux 系统。在这篇文章中,我们将讨论 Linux 中常用的 shell 命令,并通过实验来...
Linux设备管理命令详解中,每个设备都是在驱动程序控制下运行的,驱动程序与/Dev目录下的特殊文件联系在一起,尽管这些文件并不是真正的文件,但是在选择或操作设备时都以这个文件的名称来代表这个设备。 知识点3:...
Linux命令手册是Linux系统用户和管理员的重要参考资料,它详尽地阐述了如何在命令行界面中执行各种操作。对于新手来说,这份手册是快速学习和理解Linux操作的基础。以下是手册中涉及的一些关键知识点: 1. **...