码迷,mamicode.com
首页 > 其他好文 > 详细

man(manual)指令用途。

时间:2014-12-19 15:32:34      阅读:223      评论:0      收藏:0      [点我收藏+]

标签:

引用:http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/20/3031851.html

 

man [command] 可以查询到详细的指令解释和使用方式。(英文)例如:

SHUTDOWN(8)                       shutdown                       SHUTDOWN(8)

NAME
       shutdown - Halt, power-off or reboot the machine

SYNOPSIS
       shutdown [OPTIONS...] [TIME] [WALL...]

DESCRIPTION
       shutdown may be used to halt, power-off or reboot the machine.

       The first argument may be a time string (which is usually "now").
       Optionally, this may be followed by a wall message to be sent to all
       logged-in users before going down.

       The time string may either be in the format "hh:mm" for hour/minutes
       specifying the time to execute the shutdown at, specified in 24h
       clock format. Alternatively it may be in the syntax "+m" referring to
       the specified number of minutes m from now.  "now" is an alias for
       "+0", i.e. for triggering an immediate shutdown. If no time argument
       is specified, "+1" is implied.

       Note that to specify a wall message you must specify a time argument,
       too.

       If the time argument is used, 5 minutes before the system goes down
       the /run/nologin file is created to ensure that further logins shall
       not be allowed.

OPTIONS
       The following options are understood:

       --help
           Prints a short help text and exits.

       -H, --halt
           Halt the machine.

       -P, --poweroff
           Power-off the machine (the default).

       -r, --reboot
 Manual page shutdown(8) line 1 (press h for help or q to quit)

常见数字的含义

代号 代表内容
1 使用者在shell环境中可以操作的命令或可运行文件
2 系统核心可呼叫的函数与工具等
3 一些常用的函数(function)与函式库(library),大部分为C的函式库(libc)
4 装置文件的说明,通常在/dev下的文件
5 配置文件或者是某些文件的格式
6 游戏(games)
7 惯例与协议等,例如Linux文件系统、网络协议、ASCII code等等的说明
8 系统管理员可用的管理命令
9 跟kernel有关的文件

 

                                man page 的组成部分

代号 内容说明
NAME 简短的命令、数据名称说明
SYNOPSIS 简短的命令下达语法(syntax)简介
DESCRIPTION 较为完整的说明,这部分最好仔细看看!
OPTIONS 针对 SYNOPSIS 部分中,有列举的所有可用的选项说明
COMMANDS 当这个程序(软件)在运行的时候,可以在此程序(软件)中下达的命令
FILES 这个程序或数据所使用或参考或连结到的某些文件
SEE ALSO 可以参考的,跟这个命令或数据有相关的其他说明!
EXAMPLE 一些可以参考的范例
BUGS 是否有相关的错误!

 

                                man page 常用的按键

 

按键 进行工作
空格键 向下翻一页
[Page Down] 向下翻一页
[Page Up] 向上翻一页
[Home] 去到第一页
[End] 去到最后一页
/string 向『』搜寻 string 这个字符串,如果要搜寻 date 的话,就输入 /date
?string 向『』搜寻 string 这个字符串
n, N 利 用 / 或 ? 来搜寻字符串时,可以用 n 来继续下一个搜寻 (不论是 / 或 ?) ,可以利用 N 来进行『反向』搜寻。举例来说,我如果以 /date 搜寻 date 字符串, 那么可以 n 继续往下查询,用 N 往上查询。若以 ?date 向上查询 date 字符串, 那我可以用 n 继续『向上』查询,用 N 反向查询。

q

结束这次的 man page

 

PS:虽然有baidu and goodle。但个人认为帮助文档还是最好的选择。。。。。。前提你看的懂。

man(manual)指令用途。

标签:

原文地址:http://www.cnblogs.com/zheng39562/p/4173953.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!