Linux man的用法

寻求帮助


当遇到自己陌生的命令的时候,不要慌,有几个命令可以帮你查询。
命令: whatis 命令 ##介绍命令的功能
命令: 命令 –help ##介绍命令的功能
命令: man 命令 ##介绍命令的功能
[kiosk@foundation92 ~]$ whatis date ##whatis的用法
date (1) - print or set the system date and time
date (1p) - write the date and time

[kiosk@foundation92 ~]$ date –help ##–help的用法
Usage: date [OPTION]… [+FORMAT]
or: date [-u|–utc|–universal] [MMDDhhmm[[CC]YY][.ss]]
Display the current time in the given FORMAT, or set the system date.

Mandatory arguments to long options are mandatory for short options too.
-d, –date=STRING display time described by STRING, not ‘now’
-f, –file=DATEFILE like –date once for each line of DATEFILE
-I[TIMESPEC], –iso-8601[=TIMESPEC] output date/time in ISO 8601 format.
TIMESPEC=’date’ for date only (the default),
‘hours’, ‘minutes’, ‘seconds’, or ‘ns’ for date
and time to the indicated precision.
-r, –reference=FILE display the last modification time of FILE
………
[kiosk@foundation92 ~]$man date ##man的用法





man的级别
1 系统命令
2 系统接口
3 函数库
4 特殊文件,比如设备文件
5 文件
6 游戏
7 系统的软件包
8 系统管理命令
9 内核
man 5 passwd ##查看/etc/passwd文件的帮助
man 1 passwd ##查看passwd命令的帮助,1可以省略
man页面的快捷方式
上下键   ##向上或向下一行
pageup|pagedown  ##向下一个屏幕或者向上一个屏幕
d|u   ##向下或者向上半个屏幕
G|gg   ##跳转页面到man最下面或最上面
/关键字   ##搜索关键字,关键字会高亮显示,n向下匹配,N向上
q   ##退出帮助页面

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值