mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-11 15:58:42 +00:00
Update cheatsheets
This commit is contained in:
@@ -16,6 +16,10 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
`history {{20}}`
|
`history {{20}}`
|
||||||
|
|
||||||
|
- Display history with timestamps in different formats (only available in Zsh):
|
||||||
|
|
||||||
|
`history -{{d|f|i|E}}`
|
||||||
|
|
||||||
- Clear the commands history list (only for current Bash shell):
|
- Clear the commands history list (only for current Bash shell):
|
||||||
|
|
||||||
`history -c`
|
`history -c`
|
||||||
|
|||||||
42
tldr/linux/last
Normal file
42
tldr/linux/last
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, linux]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# last
|
||||||
|
|
||||||
|
> List information of last user logins.
|
||||||
|
> See also: `lastb`, `login`.
|
||||||
|
> More information: <https://manned.org/last.1>.
|
||||||
|
|
||||||
|
- List login information (e.g., username, terminal, boot time, kernel) of all users:
|
||||||
|
|
||||||
|
`last`
|
||||||
|
|
||||||
|
- List login information of a specific user:
|
||||||
|
|
||||||
|
`last {{username}}`
|
||||||
|
|
||||||
|
- List information of a specific TTY:
|
||||||
|
|
||||||
|
`last {{tty1}}`
|
||||||
|
|
||||||
|
- List most recent information (by default, the newest are at the top):
|
||||||
|
|
||||||
|
`last | tac`
|
||||||
|
|
||||||
|
- List information of system boots:
|
||||||
|
|
||||||
|
`last "{{system boot}}"`
|
||||||
|
|
||||||
|
- List information with a specific [t]imestamp format:
|
||||||
|
|
||||||
|
`last --time-format {{notime|full|iso}}`
|
||||||
|
|
||||||
|
- List information [s]ince a specific time and date:
|
||||||
|
|
||||||
|
`last --since {{-7days}}`
|
||||||
|
|
||||||
|
- List information (i.e., hostname and IP) of remote hosts:
|
||||||
|
|
||||||
|
`last --dns`
|
||||||
Reference in New Issue
Block a user