mirror of
https://github.com/trimstray/the-book-of-secret-knowledge
synced 2024-11-12 22:47:12 +00:00
/usr/bin/last
This commit is contained in:
parent
ff94eee91c
commit
0b0ea33b65
1 changed files with 11 additions and 0 deletions
11
README.md
11
README.md
|
@ -743,6 +743,7 @@ Linux Security Expert</b></a> - trainings, howtos, checklists, security tools an
|
|||
* [tr](#tool-tr)
|
||||
* [chmod](#tool-chmod)
|
||||
* [who](#tool-who)
|
||||
* [last](#tool-last)
|
||||
* [screen](#tool-screen)
|
||||
* [du](#tool-du)
|
||||
* [inotifywait](#tool-inotifywait)
|
||||
|
@ -1245,6 +1246,16 @@ who -b
|
|||
|
||||
___
|
||||
|
||||
##### Tool: [last]
|
||||
|
||||
###### Was the last reboot a panic?
|
||||
|
||||
```bash
|
||||
(last -x -f $(ls -1t /var/log/wtmp* | head -2 | tail -1);last -x -f /var/log/wtmp) | grep -A1 reboot | head -2 | grep -q shutdown && echo "clean reboot" || echo "panic reboot"
|
||||
```
|
||||
|
||||
___
|
||||
|
||||
##### Tool: [screen](https://en.wikipedia.org/wiki/GNU_Screen)
|
||||
|
||||
###### Start screen in detached mode
|
||||
|
|
Loading…
Reference in a new issue