From fb91a188bda926f0e34740a0d76608cad0aaaf7a Mon Sep 17 00:00:00 2001 From: kalebo Date: Tue, 17 Oct 2017 00:30:41 -0600 Subject: [PATCH] last: add example that avoids hostname truncation (#1540) --- pages/common/last.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/common/last.md b/pages/common/last.md index ef670573a7..b03e1054ca 100644 --- a/pages/common/last.md +++ b/pages/common/last.md @@ -10,18 +10,18 @@ `last -n {{login_count}}` -- View full login times and dates: +- Print the full date and time for entries and then display the hostname column last to prevent truncation: -`last -F` +`last -F -a` -- View the last login by a specific user: +- View all logins by a specific user and show the ip address instead of the hostname: -`last {{user_name}}` +`last {{user_name}} -i` -- View the last reboot (last login of the pseudo user reboot): +- View all recorded reboots (i.e., the last logins of the pseudo user "reboot"): `last reboot` -- View the last shutdown (last login of the pseudo user shutdown): +- View all recorded shutdowns (i.e., the last logins of the pseudo user "shutdown"): `last shutdown`