Useful Linux commands

Commands I have come across that I find very useful.

What processes are running on what ports

for d in `ss -ltn | awk '{print $4}' | rev |cut -d\: -f 1 | rev `; do sudo fuser -v -n tcp $d ; done

Get list of ips on a subnet

nmap -n -sn 
nmap -n -sn -oG - (makes it grepable)

Tune the reserved space on a device

tune2fs -m 1 # space reserve is now at 1%. default is 5%. Help free up space
Tags:, ,