Linux查看命令帮助
发布日期:2021-07-01 05:57:49 浏览次数:2 分类:技术文章

本文共 2185 字,大约阅读时间需要 7 分钟。

四种方法:man、info、help和–help

man

用于查看命令使用帮助、软件服务配置文件、系统调用和函数帮助。

使用方法
> man [参数选项] [命令/文件][参数选项]:1、2、3、4、5、6、7、81:用户命令相关2:系统调用相关3:C库函数相关4:设备和特殊文件相关5:文件格式和规则6:游戏及其他7:宏、包等8:系统管理员命令和进程> man 1 cpCP(1)                                                                                                       User Commands                                                                                                      CP(1)NAME       cp - copy files and directoriesSYNOPSIS       cp [OPTION]... [-T] SOURCE DEST       cp [OPTION]... SOURCE... DIRECTORY       cp [OPTION]... -t DIRECTORY SOURCE...

info

用于查看程序对应的文档信息

使用方法
> info [命令]> info cpFile: coreutils.info,  Node: cp invocation,  Next: dd invocation,  Up: Basic operations11.1 'cp': Copy files and directories====================================='cp' copies files (or, optionally, directories).  The copy is completelyindependent of the original.  You can either copy one file to another,or copy arbitrarily many files to a destination directory.  Synopses:

help

用于获取bash内置命令帮助

使用方法
> help [命令]> help cdcd: 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.

–help

同man命令,但只获取基础的帮助

使用方法
> [命令] --help> cp --helpUsage: cp [OPTION]... [-T] SOURCE DEST  or:  cp [OPTION]... SOURCE... DIRECTORY  or:  cp [OPTION]... -t DIRECTORY SOURCE...Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.Mandatory arguments to long options are mandatory for short options too.  -a, --archive                same as -dR --preserve=all      --attributes-only        don't copy the file data, just the attributes      --backup[=CONTROL]       make a backup of each existing destination file  -b                           like --backup but does not accept an argument      --copy-contents          copy contents of special files when recursive  -d                           same as --no-dereference --preserve=links  -f, --force                  if an existing destination file cannot be                                 opened, remove it and try again (this option                                 is ignored when the -n option is also used)

转载地址:https://pandora.blog.csdn.net/article/details/104084289 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:Linux系统启动流程(CentOS)
下一篇:Linux常见发行版本

发表评论

最新留言

第一次来,支持一个
[***.219.124.196]2024年05月05日 22时43分25秒