mirror of https://github.com/cheat/cheat.git
Add cheatsheets
This commit is contained in:
parent
97182d4cf1
commit
9d1a65b4bb
|
@ -1,3 +1,6 @@
|
||||||
|
# List all ipv4 network files
|
||||||
|
sudo lsof -i4
|
||||||
|
|
||||||
# To find listening ports:
|
# To find listening ports:
|
||||||
lsof -Pnl +M -i4
|
lsof -Pnl +M -i4
|
||||||
|
|
||||||
|
|
|
@ -9,3 +9,5 @@ netstat -pln | grep <port> | awk '{print $NF}'
|
||||||
|
|
||||||
Example output: 1507/python
|
Example output: 1507/python
|
||||||
|
|
||||||
|
# Fast display of ipv4 tcp listening programs
|
||||||
|
sudo netstat -vtlnp --listening -4
|
||||||
|
|
|
@ -31,3 +31,6 @@ nmap -traceroute [target]
|
||||||
# TCP ACK ping: -PA
|
# TCP ACK ping: -PA
|
||||||
# UDP ping: -PU
|
# UDP ping: -PU
|
||||||
# ARP ping: -PR
|
# ARP ping: -PR
|
||||||
|
|
||||||
|
# Example: Ping scan all machines on a class C network
|
||||||
|
nmap -sP 192.168.0.0/24
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
# Concatenate all pdf files into one:
|
# Concatenate all pdf files into one:
|
||||||
pdftk *.pdf cat output all.pdf
|
pdftk *.pdf cat output all.pdf
|
||||||
|
|
||||||
|
# Concatenate specific pdf files into one:
|
||||||
|
pdftk 1.pdf 2.pdf 3.pdf cat output 123.pdf
|
||||||
|
|
||||||
# Concatenate pages 1 to 5 of first.pdf with page 3 of second.pdf
|
# Concatenate pages 1 to 5 of first.pdf with page 3 of second.pdf
|
||||||
pdftk A=fist.pdf B=second.pdf cat A1-5 B3 output new.pdf
|
pdftk A=fist.pdf B=second.pdf cat A1-5 B3 output new.pdf
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
# To list every process on the system:
|
# To list every process on the system:
|
||||||
ps aux
|
ps aux
|
||||||
|
|
||||||
|
# To list a process tree
|
||||||
|
ps axjf
|
||||||
|
|
||||||
# To list every process owned by foouser:
|
# To list every process owned by foouser:
|
||||||
ps -aufoouser
|
ps -aufoouser
|
||||||
|
|
||||||
# To list every process with a user-defined format:
|
# To list every process with a user-defined format:
|
||||||
ps -eo pid,user,command
|
ps -eo pid,user,command
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Concatenate all pdf files into one:
|
||||||
|
sam2p *.pdf out.pdf
|
Loading…
Reference in New Issue