Linux finger命令詳解 Linux finger命令怎麼用

來源:互聯網
上載者:User

會列出來的資料有:

  • Login Name
  • User Name
  • Home directory
  • Shell
  • Login status
  • mail status
  • .plan
  • .project
  • .forward

其中 .plan、.project 和 .forward 就是使用者在他的 Home Directory 裡的 .plan , .project 和 .forward 等檔案裡的資料。如果沒有就沒有。finger 指令並不限定於在同一伺服器上查詢,也可以尋找某一個遠端伺服器上的使用者。只要給一個像是 E-mail address 一般的地址即可。

使用許可權:所有使用者。

文法

finger [options] user[@address]

參數說明:

  • -l  多行顯示。
  • -s  單行顯示。這個選項只顯示登入名稱、真實姓名、終端機名稱、閑置時間、登入時間、辦公室號碼及電話號碼。如果所查詢的使用者是遠端伺服器的使用者,這個選項無效。

執行個體

列出當前登入使用者的相關資訊

# finger -l //顯示使用者資訊

Login: root Name: root

Directory: /root Shell: /bin/bash

On since Fri Apr 9 20:17 (CST) on :0 (messages off)

On since Fri Apr 9 20:17 (CST) on pts/1 32 days 22 hours idle

On since Fri Apr 9 20:17 (CST) on pts/3 4 hours 5 minutes idle (messages off)

On since Wed May 12 18:08 (CST) on pts/4 from 192.168.1.10

On since Wed May 12 18:35 (CST) on pts/5 from 192.168.1.10 7 minutes 54 seconds idle

On since Wed May 12 14:37 (CST) on pts/2 from 192.168.1.10 3 hours 14 minutes idle

On since Wed May 12 14:53 (CST) on pts/7 34 minutes 25 seconds idle (messages off)

On since Wed May 12 16:53 (CST) on pts/8 from 192.168.1.10 30 minutes 18 seconds idle

Mail last read Mon Mar 31 04:02 2008 (CST)

No Plan.

顯示指定使用者資訊

# finger -m hnlinux

顯示遠端使用者資訊

# finger -m root@192.168.1.13

下列指令可以查詢本機管理員的資料:

finger root

其結果如下:

Login: root Name: root

Directory: /root Shell: /bin/bash

Never logged in.

No mail.

No Plan.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.