1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-15 01:24:29 +02:00

update last example with new timestamp fields

This commit is contained in:
Kelly Brazil
2021-03-25 12:07:36 -07:00
parent ad645636d0
commit 7b2dc86a8d

View File

@ -1541,32 +1541,36 @@ cat keyvalue.txt | jc --kv -p
``` ```
### last and lastb ### last and lastb
```bash ```bash
last | jc --last -p # or: jc -p last last -F | jc --last -p # or: jc -p last -F
``` ```
```json ```json
[ [
{ {
"user": "joeuser", "user": "kbrazil",
"tty": "ttys002", "tty": "pts/0",
"hostname": null, "hostname": "kbrazil-mac.attlocal.net",
"login": "Thu Feb 27 14:31", "login": "Tue Jan 5 14:29:24 2021",
"logout": "still logged in" "logout": "still logged in",
"login_epoch": 1609885764
}, },
{ {
"user": "joeuser", "user": "kbrazil",
"tty": "ttys003", "tty": "tty1",
"hostname": null, "hostname": null,
"login": "Thu Feb 27 10:38", "login": "Tue Jan 5 14:28:41 2021",
"logout": "10:38", "logout": "still logged in",
"duration": "00:00" "login_epoch": 1609885721
}, },
{ {
"user": "joeuser", "user": "reboot",
"tty": "ttys003", "tty": "system boot",
"hostname": null, "hostname": "3.10.0-1062.1.2.el7.x86_64",
"login": "Thu Feb 27 10:18", "login": "Tue Jan 5 14:28:28 2021",
"logout": "10:18", "logout": "Tue Jan 5 14:29:36 2021",
"duration": "00:00" "duration": "00:01",
"login_epoch": 1609885708,
"logout_epoch": 1609885776,
"duration_seconds": 68
} }
] ]
``` ```