mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-15 10:59:58 +00:00
Update cheatsheets
This commit is contained in:
20
tldr/last
20
tldr/last
@@ -8,26 +8,34 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> 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`:
|
||||
- View last login infromation (e.g., username, terminal, boot time, kernel) of all users as read from `/var/log/wtmp`:
|
||||
|
||||
`last`
|
||||
|
||||
- List login information of a specific user:
|
||||
|
||||
`last {{username}}`
|
||||
|
||||
- Specify how many of the last logins to show:
|
||||
|
||||
`last -n {{login_count}}`
|
||||
`last {{[-n|--limit]}} {{login_count}}`
|
||||
|
||||
- Print the full date and time for entries and then display the hostname column last to prevent truncation:
|
||||
|
||||
`last -F -a`
|
||||
`last {{[-F|--fulltimes]}} {{[-a|--hostlast]}}`
|
||||
|
||||
- View all logins by a specific user and show the IP address instead of the hostname:
|
||||
|
||||
`last {{username}} -i`
|
||||
`last {{username}} {{[-i|--ip]}}`
|
||||
|
||||
- List information since a specific time and date:
|
||||
|
||||
`last {{[-s|--since]}} {{-7days}}`
|
||||
|
||||
- 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"):
|
||||
- Display help:
|
||||
|
||||
`last shutdown`
|
||||
`last {{[-h|--help]}}`
|
||||
|
||||
Reference in New Issue
Block a user