zoukankan      html  css  js  c++  java
  • who

    功能说明:显示已经登录系统的用户,以及系统的启动时间等信息。

    参数选项:
    -a 显示所有信息,相当于 -b -d --login -p -r -t -T -u
    -b 显示系统的启动时间。
    -d 显示已死的进程。
    -H 显示标题,默认不显示。
    -l 显示登录进程。

    [root@pydbdev ~]# who
    root pts/4 2018-06-25 01:23 (192.168.56.4)
    [root@pydbdev ~]# who -b
    system boot 2018-06-24 20:52
    [root@pydbdev ~]# who -d
    pts/0 2018-06-25 01:37 2058 id=ts/0 term=0 exit=0
    pts/1 2018-06-25 02:42 27941 id=ts/1 term=0 exit=0
    pts/2 2018-06-25 03:21 28172 id=ts/2 term=0 exit=0
    pts/3 2018-06-25 03:22 28298 id=ts/3 term=0 exit=0
    [root@pydbdev ~]# who -l
    LOGIN tty3 2018-06-24 20:52 1870 id=3
    LOGIN tty5 2018-06-24 20:52 1874 id=5
    LOGIN tty2 2018-06-24 20:52 1868 id=2
    LOGIN tty4 2018-06-24 20:52 1872 id=4
    LOGIN tty6 2018-06-24 20:52 1876 id=6
    [root@pydbdev ~]# who -H
    NAME LINE TIME COMMENT
    root pts/4 2018-06-25 01:23 (192.168.56.4)
    [root@pydbdev ~]# who -H -a
    NAME LINE TIME IDLE PID COMMENT EXIT
    system boot 2018-06-24 20:52
    run-level 5 2018-06-24 20:52
    LOGIN tty3 2018-06-24 20:52 1870 id=3
    LOGIN tty5 2018-06-24 20:52 1874 id=5
    LOGIN tty2 2018-06-24 20:52 1868 id=2
    LOGIN tty4 2018-06-24 20:52 1872 id=4
    LOGIN tty6 2018-06-24 20:52 1876 id=6
    pts/0 2018-06-25 01:37 2058 id=ts/0 term=0 exit=0
    pts/1 2018-06-25 02:42 27941 id=ts/1 term=0 exit=0
    pts/2 2018-06-25 03:21 28172 id=ts/2 term=0 exit=0
    pts/3 2018-06-25 03:22 28298 id=ts/3 term=0 exit=0
    root + pts/4 2018-06-25 01:23 . 28480 (192.168.56.4)

  • 相关阅读:
    MaaS系统概述
    流处理认识
    事务补偿
    Hystrix原理与实战
    RPC概念和框架
    git remote: error: hook declined to update
    Unity CombineTexture
    Windows Powershell统计代码行数
    unity面试题二
    unity面试题一
  • 原文地址:https://www.cnblogs.com/liang545621/p/9503027.html
Copyright © 2011-2022 走看看