In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to use finger and chfn commands in Linux". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to use finger and chfn commands in Linux.
Finger
Overview
Finger [- lmsp] [user...] [user@host...] [[]]
Parameters:
S
Finger displays the user's login name, real name, terminal name and write status (if writing is prohibited, a ``* is displayed after the terminal name), idle time, login time, office location, phone number, etc.
The login time is displayed as months, days, hours and minutes, and if it is more than 6 months ago, the year is displayed instead of hours and minutes.
The unknown device and idle time and login time that do not exist are displayed as an asterisk.
-l
Generate a multi-line display to describe the information-s about the user's home directory, home phone, login script, mail status and file contents ``.plan and ``.project and ``.forward from the user's home directory.
The 11-digit phone number is displayed as ``+ N-NNN-NNN-NNNN. Ten or seven digits can be displayed as a subset of it. The five-digit phone number is displayed as ``xN-NNNN. The four-digit phone number is displayed as ``xNNNN.
If writing to the device is prohibited, the phrase ``(messages off) is appended to the line with the device. Each user has an entry, using the-l option; if a user logs in multiple times, the terminal information is displayed repeatedly for each login. .
If there is no mail at all, the message is displayed as ``No Mail.,. If you have checked your mailbox after the new email arrives, it is ``New mail received # # HH:MM YYYY (TZ). If there is a new email, it is ``email..., ``Unread since...
-p
Prevent the finger-l option from displaying the contents of the ``.plan and ``.project files.
-m
Prevent the matching of user names. User is usually a login; however, the user's real name is also matched unless the-m option is provided. All name matches performed by finger are case-sensitive
Do not specify the finger option if the operator is provided, the default is-l output style, otherwise it is-s style. Note that in both formats, some fields may be lost if there is insufficient information.
If the parameter finger is not specified, an entry is printed for each user currently logged in.
Finger can be used to view user information on remote machines in a format that specifies user as ``user@host or`` @ host. The default output of the former is-l style, and the default output of the latter is-s style. -l is the only option to pass to a remote machine.
If the standard output is a socket finger, a carriage return is inserted before each newline character. This is to handle remote finger requests called by.
Example:
The code is as follows:
[root@localhost ~] # finger munin # View munin user information
Login: munin Name: Munin user
Directory: / var/lib/munin Shell: / sbin/nologin
Never logged in.
No mail.
No Plan.
Chfn
Name
Chfn-change your message
Grammar
Chfn [- f full-name] [- o office] [- p office-phone] [- h home-phone] [- u] [- v] [username]
Description
Chfn is used to change your finger messages. The message is stored in the / etc/passwd file. You can display your message through finger. Linux finger command
Four messages are displayed, all of which can be changed by chfn: real name, workplace phone number, and home phone number.
Command line
Each message can be specified on the command line. If no message is given, chfn enters conversation mode
INTERACTIVE MODE
The conversation mode chfn will prompt in front of each column. When prompted, you can enter a new message or press return without changing it. Enter "none" for the table
Show that the column is blank.
Option
-f,-- full-name
Real name
-h,-- home-phone
Home phone number
-o,-- office
Office number
-p,-- office-phone
Office phone
-u,-- help
Show a short message of instructions.
-v,-- version
Show the version message.
Example:
The code is as follows:
[root@localhost ~] # chfn
Changing user information for root
Please enter a new value, or directly hit enter to use the default value
Full name [root]: zhangy
Room number []: 8888
Work phone []: 1234567
Home phone []: 7654321
Other []: no
[root@localhost] # chfn-f tank
Thank you for your reading, the above is the content of "how to use finger and chfn commands in Linux". After the study of this article, I believe you have a deeper understanding of how to use finger and chfn commands in Linux. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.