Latest web development tutorials

Linux dernière commande

Linux commande Daquan Linux commande Daquan

dernière commande Linux est utilisé pour afficher le système depuis le début, dès le début de chaque mois est admissible à un message d'un signe.

Accès: Tous les utilisateurs.

grammaire

shell>> last [options]

Description Paramètre:

  • -R Champ hostname Omis
  • il y a des mois Affichage num -num
  • Signe de messages username nom d'utilisateur
  • tty limite signe message inclut le code du terminal

Exemples

shell>> last -R -2
johnney pts/1 Mon Aug 14 20:42 still logged in
johnney pts/0 Mon Aug 14 19:59 still logged in
wtmp begins Tue Aug 1 09:01:10 2000 ### /var/log/wtmp
shell>> last -2 minery
minery pts/0 140.119.217.115 Mon Aug 14 18:37 - 18:40 (00:03)
minery pts/0 140.119.217.115 Mon Aug 14 17:22 - 17:24 (00:02)
wtmp begins Tue Aug 1 09:01:10 2000

méthode d'affichage général

# last

Bref affichage, et spécifier le nombre d'affichage

# last -n 5 -R
root   pts/4    Thu May 13 17:25  still logged in  
root   pts/2    Thu May 13 17:23 - 17:25 (00:02)  
root   pts/1    Thu May 13 16:46  still logged in  
root   pts/7    Thu May 13 15:36  still logged in  
root   pts/9    Thu May 13 15:35  still logged in  

wtmp begins Thu May 13 18:55:40 2014

Affiche la dernière colonne indique l'adresse IP de l'hôte

# last -n 5 -a -i
root   pts/4    Thu May 13 17:25  still logged in  192.168.1.10
root   pts/2    Thu May 13 17:23 - 17:25 (00:02)   192.168.1.10
root   pts/1    Thu May 13 16:46  still logged in  192.168.1.10
root   pts/7    Thu May 13 15:36  still logged in  192.168.1.10
root   pts/9    Thu May 13 15:35  still logged in  192.168.1.10

wtmp begins Thu May 13 18:55:40 2014

Linux commande Daquan Linux commande Daquan