netcat example
Listen on specified port:
nc -l -v -k 8888
Connect via netcat:
nc -v google.com 80
Listen on specified port:
nc -l -v -k 8888
Connect via netcat:
nc -v google.com 80
journalctl -n 1000 | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" | sort | uniq -c
Create TCP dump of all traffic on localhost on port 8888
sudo tcpdump -i lo "port 8888" -w dump
To list all files installed by dnf package:
rpm -ql dnf
watch -n 0.5 "ps -eLf | grep traffic_server | wc -l"
Edit file /etc/sysconfig/firewalld
:
FIREWALLD_ARGS=--debug=10
List all routes in system:
route -n
Get route for a specific IP:
ip route get 1.1.1.1
14:27 $ (set -x; sleep 1 && sleep 2)
+ sleep 1
+ sleep 2
One liner to monitor a process with the name /wshub:
top -p "$(pgrep -f /wshub)"
Print every second cpu and memory usage of the process:
watch -n 1 "ps -eo pid,pcpu,pmem,args | kazy -i xnotitle -e kazy"