Views
From Wiki
Jump to: navigation, search
tcpdump -nnqt ether dst $(awk '{/eth0/};END{print $4}' /proc/net/arp) > out

Print traffic counts to port 80:

awk  '/x.x.x.x.80/ {print $2,$4,$5}' out | cut -d "." -f 1-4 | sort -n | uniq -c

Print matches by column:

mysql -e "show table status from wajasco_wajas" | awk '{ if ($2 == "NULL") print $0;}'

Generate list of accounts to restore:

ls /backup/cpbackup/weekly/ -lh |awk '/Oct\ 11/ {print $9}' | cut -d "." -f 1 > users.txt
Personal tools