diff --git a/translated/tech/20230107.0 ⭐️ Learn w Command in Linux & BSD with Examples.md b/published/20230107.0 ⭐️ Learn w Command in Linux & BSD with Examples.md similarity index 66% rename from translated/tech/20230107.0 ⭐️ Learn w Command in Linux & BSD with Examples.md rename to published/20230107.0 ⭐️ Learn w Command in Linux & BSD with Examples.md index 598dbbcf7b..65d0c7dced 100644 --- a/translated/tech/20230107.0 ⭐️ Learn w Command in Linux & BSD with Examples.md +++ b/published/20230107.0 ⭐️ Learn w Command in Linux & BSD with Examples.md @@ -3,18 +3,18 @@ [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15437-1.html" -带示例学习 Linux 和 BSD 中的 w 命令 +w 命令的解释与示例 ====== -**下面是一份关于理解 Linux 和 BSD 中的 w 命令的初学者指南,并附有几个例子。** +> 下面是一份关于理解 Linux 和 BSD 中的 w 命令的初学者指南,并附有几个例子。 -![][1] +![][0] -_这篇文章是 [Linux 命令][2]学习系列的一部分。_ +这篇文章是 [Linux 命令][2]学习系列的一部分。 ### w 命令 @@ -34,18 +34,18 @@ w [options] [username] 下面是一些使用 `w` 命令的例子。 -当你只用 w 运行它时,它显示以下输出。 +当你只用 `w` 运行它时,它显示以下输出: ``` $ w 21:45:07 up 1 day, 12:48, 1 user, load average: 1.05, 0.85, 0.56 USER TTY LOGIN@ IDLE JCPU PCPU WHAT -debugpoi tty2 Thu08 36:48m 0.03s 0.03s /usr/libexec/gnome-session-binary +debugpoi tty2 Thu08 36:48m 0.03s 0.03s /usr/libexec/gnome-session-binary ``` ![Linux 中 w 命令的基本输出][3] -解释:USER 列给出了用户名,然后是终端号、登录日期时间、IDLE 时间、CPU 使用率,以及用户正在执行的进程。 +解释:`USER` 列给出了用户名,然后是终端号、登录日期时间、空闲时间、CPU 使用率,以及用户正在执行的进程。 - `USER` - 在你的 Linux 或 BSD 系统中登录的用户名称。 - `TTY` - 当前会话的终端标识符号。 @@ -53,10 +53,10 @@ debugpoi tty2 Thu08 36:48m 0.03s 0.03s /usr/libexec/gnome-session-binar - `LOGIN@` - 用户登录的时间。它有时会根据你的系统设置显示日期。 - `IDLE` - 用户与终端交互后的空闲时间。 - `JCPU` - 该会话的所有用户进程使用的 CPU 时间。 -- `PCPU` - 该用户进程使用的时间,在 WHAT 字段中提到。 +- `PCPU` - 该用户的进程(在 `WHAT` 字段中提到)使用的时间。 - `WHAT` - 当前带参数的进程。 -下面是 w 命令的另一个例子,有两个用户在虚拟机环境中登录。正如你所看到的,显示了两个用户名与当前运行的带有进程参数的独立进程。 +下面是 `w` 命令的另一个例子,有两个用户在虚拟机环境中登录。正如你所看到的,显示了两个用户名与当前运行的带有进程参数的独立进程。 ![演示多用户环境的 w 命令输出][4] @@ -68,13 +68,13 @@ debugpoi tty2 Thu08 36:48m 0.03s 0.03s /usr/libexec/gnome-session-binar $ w -h ``` --f 选项可以在输出中切换 FROM 字段的可见性。 +`-f` 选项可以在输出中切换 `FROM` 字段的可见性。 ``` $ w -f ``` -使用 `-s` 选项打印一个简短的输出,不包括 JCPU、PCPU 和 LOGIN@ 信息。 +使用 `-s` 选项打印一个简短的输出,不包括 `JCPU`、`PCPU` 和 `LOGIN@` 信息。 ``` $ w -s @@ -88,9 +88,7 @@ $ w debugpoint ### 结束语 -我希望这篇文章能帮助你了解 w 命令及其基本原理。你也可以阅读 [w 手册页][5]来了解更多。如果你有任何问题,请告诉我。 - -**本文是 [Linux 命令][2]学习系列的一部分**。 +我希望这篇文章能帮助你了解 `w` 命令及其基本原理。你也可以阅读 [w 手册页][5] 来了解更多。如果你有任何问题,请告诉我。 -------------------------------------------------------------------------------- @@ -99,7 +97,7 @@ via: https://www.debugpoint.com/w-command-linux-examples/ 作者:[Arindam][a] 选题:[lkxed][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -110,3 +108,4 @@ via: https://www.debugpoint.com/w-command-linux-examples/ [3]: https://www.debugpoint.com/wp-content/uploads/2023/01/a-basic-outout-of-w-command-in-Linux.jpg [4]: https://www.debugpoint.com/wp-content/uploads/2023/01/w-command-output-for-a-demo-multi-user-environment.jpg [5]: https://linux.die.net/man/1/w +[0]: https://img.linux.net.cn/data/attachment/album/202301/12/100901f1rnn4zu2u12ligr.jpg \ No newline at end of file