w命令w(1)在哪?

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
cjsh716
帖子: 20
注册时间: 2017-10-30 15:40
系统: unbuntu

w命令w(1)在哪?

#1

帖子 cjsh716 » 2017-10-30 23:06

用法:
w [选项]

选项:
-h, --no-header do not print header
-u, --no-current ignore current process username
-s, --short short format
-f, --from show remote hostname field
-o, --old-style old style output
-i, --ip-addr display IP address instead of hostname (if possible)

--help display this help and exit
-V, --version 显示程序版本然后离开

欲了解更多详细信息,请参见 w(1)。
科学之子
帖子: 2284
注册时间: 2013-05-26 6:58
系统: Debian 9

Re: w命令w(1)在哪?

#2

帖子 科学之子 » 2017-10-30 23:59

"w(1)"的含义是"man 1 w"或"man w.1"
那个数字是对应的section(看"man man"的介绍)
拿swapon举例, swapon 既是一个系统管理命令,又是一个系统调用
"man swapon.8"打开的是关于系统管理命令的swapon信息.
"man swapon.2"打开的时关于系统调用的swapon信息.
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: w命令w(1)在哪?

#3

帖子 poloshiao » 2017-10-31 8:15

请参见 w(1)
1. https://www.mankier.com/1/w
w — Show who is logged on and what they are doing.
2. http://manpages.ubuntu.com/manpages/artful/zh_CN/man1/w.1.html
w - 显示已登录用户以及他们正在干什么。

3. 奇怪的是 英文版 沒有 待查證
3-1. http://manpages.ubuntu.com/manpages/artful/en/man1/w.1.html
3-2. http://manpages.ubuntu.com/manpages/artful/man1/w.1.html
科学之子
帖子: 2284
注册时间: 2013-05-26 6:58
系统: Debian 9

Re: w命令w(1)在哪?

#4

帖子 科学之子 » 2017-10-31 12:02

poloshiao 写了:
请参见 w(1)
1. https://www.mankier.com/1/w
w — Show who is logged on and what they are doing.
2. http://manpages.ubuntu.com/manpages/artful/zh_CN/man1/w.1.html
w - 显示已登录用户以及他们正在干什么。

3. 奇怪的是 英文版 沒有 待查證
3-1. http://manpages.ubuntu.com/manpages/artful/en/man1/w.1.html
3-2. http://manpages.ubuntu.com/manpages/artful/man1/w.1.html
不知道为什么英文版的在线manpage文件名变成了"w.procps.1.html".
Debian的在线manapge也是一样
https://manpages.debian.org/stretch/pro ... .1.en.html
猜测问题可能是出在上游的Debian上.
grep的检索词是这样得出的:

代码: 全选

basename $(realpath $(type -p w))
grep检索结果:

代码: 全选

$ wget -O - http://manpages.ubuntu.com/manpages/zesty/man1/ |grep procps
--2017-10-31 11:57:05--  http://manpages.ubuntu.com/manpages/zesty/man1/
Resolving manpages.ubuntu.com (manpages.ubuntu.com)... 91.189.95.15, 2001:67c:1560:8008::11
Connecting to manpages.ubuntu.com (manpages.ubuntu.com)|91.189.95.15|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘STDOUT’

-                                                [                                                                                      <=>     ]   4.64M   133KB/s               <img src="/icons/text.gif" alt="[TXT]"> <a href="w.procps.1.html">w.procps.1.html</a>                                                           
-                                                [                                                                           <=>                ]   4.94M   120KB/s    in 28s     

2017-10-31 11:57:35 (178 KB/s) - written to stdout [5178362]
cjsh716
帖子: 20
注册时间: 2017-10-30 15:40
系统: unbuntu

Re: w命令w(1)在哪?

#5

帖子 cjsh716 » 2017-11-01 16:42

thanks! :em01
回复