Skip to content

Commit

Permalink
fix command #last and add new commands for #System and #Others
Browse files Browse the repository at this point in the history
  • Loading branch information
onceupon committed Aug 29, 2024
1 parent 80c5012 commit 3199d63
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1552,9 +1552,17 @@ stat filename.txt
ps aux
```

##### List processes by top memory usage
```bash
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head
```

##### Display a tree of processes
```bash
pstree
# or
ps aux --forest
```

##### Find maximum number of processes
Expand Down Expand Up @@ -1960,7 +1968,7 @@ ldconfig -p
ldd /bin/ls
```

##### Check user login
##### Check the most recent login of all users
```bash
lastlog
```
Expand Down Expand Up @@ -2273,7 +2281,12 @@ sar -f /var/log/sa/sa31|tail
journalctl --file ./log/journal/a90c18f62af546ccba02fa3734f00a04/system.journal --since "2020-02-11 00:00:00"
```

##### Show a listing of last logged in users.
##### Show a listing of last logged in users
```bash
last
```

##### Show a listing of unsuccessful (bad) login attempts
```bash
lastb
```
Expand Down Expand Up @@ -2918,6 +2931,11 @@ cat >>myfile
let me add sth here
# exit with ctrl+d
# or
cat << EoF >> filename
> add something here
> EoF
# or using tee
tee -a myfile
let me add sth else here
Expand Down Expand Up @@ -3287,6 +3305,12 @@ scp -r directoryname user@ip:/path/to/send
# :(){:|:&};:
```
##### Trigger kernel crash
```bash
# Don't try this at home!
echo c > /proc/sysrq-trigger
```
##### Use the last argument
```bash
!$
Expand Down

0 comments on commit 3199d63

Please sign in to comment.