查看“︁从Shell中寻找帮助”︁的源代码
←
从Shell中寻找帮助
跳转到导航
跳转到搜索
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
提示:你可以进一步查看 SDF 的具体帮助说明,如 FAQ! 虽然 UNIX shell 看起来有点令人生畏和冰冷,它有两个字母的神秘命令、几十个命令行开关,而且没有动画回形针为你指明方向,但有几种不同的方法可以从系统中获得帮助。 ---- === 使用手册(帮助文档) === 获取帮助的最简单、最全面的方法就是阅读手册。在使用电脑的过程中,你可能在某个地方听说过 RTFM(Read The Fscking Manual),这就是那本《手册》。手册是每种 UNIX 的标准文档形式。学会使用它们。学会爱护它们。 在哪里可以找到它们?其实很简单。想想一个命令(ls、rm、chmod、kill、grep)或一个程序(vi、mutt、snarf、majordomo),然后继续键入<syntaxhighlight lang="shell" line="1"> % man command </syntaxhighlight>其中<code>command</code>正是你想了解的命令的名称。正如你所看到的,手册被分成不同的部分。我们以 <code>mkdir</code> 为例。<syntaxhighlight lang="shell-session"> % man mkdir MKDIR(1) NetBSD General Commands Manual MKDIR(1) NAME mkdir - make directories mkdir - 创建目录 SYNOPSIS mkdir [-p] [-m mode] directory_name ... DESCRIPTION mkdir creates the directories named as operands, in the order specified, 使用mkdir按照指定对象的顺序创建目录, using mode rwxrwxrwx (0777) as modified by the current umask(2). 默认使用当前由umask规定的模式 rwxrwxrwx (0777) The options are as follows: 可选项如下: -m Set the file permission bits of the final created directory to -m 将最终创建目录的文件权限设置为指定模式。 the specified mode. The mode argument can be in any of the for- 模式参数可以是为 chmod(1) 工具指定的任何模式。 mats specified to the chmod(1) utility. If a symbolic mode is 如果指定的是符号模式,操作符 ``+'' 和 ``-'' 将 specified, the operation characters ``+'' and ``-'' are inter- 相对于初始模式 ``a=rwx'' 进行解释。 preted relative to an initial mode of ``a=rwx''. -p Create intermediate directories as required. If this option is -p 根据需要创建中间目录。 如果未指定该选项, not specified, the full path prefix of each operand must already 则每个操作数的完整路径前缀必须已经存在。 exist. Intermediate directories are created with permission bits 创建的中间目录权限为 rwxrwxrwx (0777), of rwxrwxrwx (0777) as modified by the current umask, plus write 由当前 umask 修改,外加所有者的写入和搜索权限。 and search permission for the owner. Do not consider it an error 如果参数目录已经存在,则不视为错误。 if the argument directory already exists. 译者注:比如命令 mkdir -p intermediate/name, 其中intermediate就为中间目录,若中间目录不存在则创建一个。 若不加参数 -p 则会报错。 The user must have write permission in the parent directory. 用户必须有写入父目录的权限。 EXIT STATUS 退出状态 mkdir exits 0 if successful, and >0 if an error occurred. mkdir 如果成功则退出 0,如果出错则退出 >0。 SEE ALSO 也请看 chmod(1), rmdir(1), mkdir(2), umask(2) chmod(1), rmdir(1), mkdir(2), umask(2) STANDARDS 标准 The mkdir utility is expected to be IEEE Std 1003.2 (``POSIX.2'') compat- mkdir 工具有望与 IEEE Std 1003.2("POSIX.2")兼容。 ible. NetBSD 2.0.2 January 25, 1994 NetBSD 2.0.2 </syntaxhighlight>
返回
从Shell中寻找帮助
。
导航菜单
个人工具
中文(中国大陆)
登录
命名空间
页面
讨论
大陆简体
查看
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
工具
链入页面
相关更改
特殊页面
页面信息