W who whoami last Lastb lastlog basename sleep hostname mail
################################################
W.H.O.
WhoAmI
Last: Displays the/var/log/wtmp file, showing the user login history and System restart history
Lastb:/var/log/btmp file that displays user error attempts to log on
Lastlog: Users who have never logged in
################################################
BaseName
$: Script path and name when executing script
################################################
Sleep???
Example: every 5 seconds, log root is logged in, such as log in, show that it is logged in, and exit
Sleep 5 who | grep root
################################################
Hostname??
If the host name is not James, change it to James.
If the current host name is localhost, change it to James
################################################
Generate random numbers
random:0-32768
Random number generator
/dev/random
/dev/urandom
################################################
Mail
[Email protected] ~]# Cat/etc/sysconfig/network-scripts/ifcfg-eth0 | Mail-s "How is you?" root
[[Email protected] ~]# mail
Heirloom Mail Version 12.4 7/29/08. Type? For help.
"/var/spool/mail/root": 3 messages
> 1 [email protected] Wed Jul 04:02 83/4061 "[ABRT] full crash rep"
2 root Wed Nov 10:14 19/630 "How is it?"
3 root Wed Nov 10:33 34/913 "How is it?"
&
[Email protected] ~]# Cat/etc/sysconfig/network-scripts/ifcfg-eth0 | Mail-s "How is you?" root
This article is from the "James Zhan Linux Advanced ops" blog, so be sure to keep this source http://jameszhan.blog.51cto.com/10980469/1877468
Linux Basic article -19,w who whoami last Lastb lastlog basename