centos下用户信息查询finger

本文详细介绍了finger命令的功能与使用方法,包括如何安装finger软件包、不同的选项参数及其作用,如-l、-m、-s和-p等。此外还提供了一个具体的使用实例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

简介
finger命令用于查找并显示用户信息。包括本地与远端主机的用户皆可,帐号名称没有大小写的差别。单独执行finger指令,它会显示本地主机现在所有的用户的登陆信息,包括帐号名称,真实姓名,登入终端机,闲置时间,登入时间以及地址。
A、install software
# 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

# yum -y install finger
B、finger使用方法
# finger --help
finger: invalid option -- '-'
usage: finger [-lmps] [login ...]
-l:列出该用户的帐号名称,真实姓名,用户专属目录,登入所用的Shell,登入时间,转信地址,电子邮件状态,还有计划文件和方案文件内容;
-m:排除查找用户的真实姓名;
-s:列出该用户的帐号名称,真实姓名,登入终端机,闲置时间,登入时间以及地址和电话; -p:列出该用户的帐号名称,真实姓名,用户专属目录,登入所用的Shell,登入时间,转信地址,电子邮件状态,但不显示该用户的计划文件和方案文件内容。

C、test
# 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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值