mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-11 14:58:39 +00:00
Update cheatsheets
This commit is contained in:
33
last
Normal file
33
last
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# last
|
||||
|
||||
> View the last logged in users.
|
||||
> More information: <https://manned.org/last>.
|
||||
|
||||
- View last logins, their duration and other information as read from `/var/log/wtmp`:
|
||||
|
||||
`last`
|
||||
|
||||
- Specify how many of the last logins to show:
|
||||
|
||||
`last -n {{login_count}}`
|
||||
|
||||
- Print the full date and time for entries and then display the hostname column last to prevent truncation:
|
||||
|
||||
`last -F -a`
|
||||
|
||||
- View all logins by a specific user and show the IP address instead of the hostname:
|
||||
|
||||
`last {{username}} -i`
|
||||
|
||||
- View all recorded reboots (i.e., the last logins of the pseudo user "reboot"):
|
||||
|
||||
`last reboot`
|
||||
|
||||
- View all recorded shutdowns (i.e., the last logins of the pseudo user "shutdown"):
|
||||
|
||||
`last shutdown`
|
||||
Reference in New Issue
Block a user