centos下用戶信息查詢finger

永久鏈接: http://liuyi201407313018.iteye.com/blog/2401420

簡介
finger命令用於查找並顯示用戶信息。包括本地與遠端主機的用戶皆可,帳號名稱沒有大小寫的差別。單獨執行finger指令,它會顯示本地主機現在所有的用戶的登陸信息,包括帳號名稱,真實姓名,登入終端機,閒置時間,登入時間以及地址。
A、install software
[root@localhost ~]# yum info finger
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile

  • webtatic: us-east.repo.webtatic.com
    Available Packages
    Name : finger
    Arch : x86_64
    Version : 0.17
    Release : 40.el6
    Size : 22 k
    Repo : base
    Summary : The finger client
    License : BSD
    Description : Finger is a utility which allows users to see information about system
    : users (login name, home directory, name, how long they've been logged
    : in to the system, etc.). The finger package includes a standard
    : finger client.
    :
    : You should install finger if you'd like to retrieve finger information
    : from other systems

[root@localhost ~]# yum -y install finger
B、finger使用方法
[root@localhost ~]# finger --help
finger: invalid option -- '-'
usage: finger [-lmps] [login ...]
-l:列出該用戶的帳號名稱,真實姓名,用戶專屬目錄,登入所用的Shell,登入時間,轉信地址,電子郵件狀態,還有計劃文件和方案文件內容;
-m:排除查找用戶的真實姓名;
-s:列出該用戶的帳號名稱,真實姓名,登入終端機,閒置時間,登入時間以及地址和電話; -p:列出該用戶的帳號名稱,真實姓名,用戶專屬目錄,登入所用的Shell,登入時間,轉信地址,電子郵件狀態,但不顯示該用戶的計劃文件和方案文件內容。

C、test
[root@localhost ~]# finger root
Login: root Name: root
Directory: /root Shell: /bin/bash
Last login 三 11月 1 09:45 (CST) on tty1
New mail received 四 11月 30 10:59 2017 (CST)
Unread since 四 12月 17 20:59 2015 (CST)
No Plan.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章