勉強したこと、調べたことを記録する
$ ipcalc -n ${IP} $ ipcalc -m ${IP} $ ipcalc -p ${IP} $ ipcalc -b ${IP}
$ ip addr show eth1 | grep inet\ | cut -d' ' -f6 | xargs ipcalc -n NETWORK=172.16.200.0 $ ip addr show eth1 | grep inet\ | cut -d' ' -f6 | xargs ipcalc -m NETMASK=255.255.255.0 $ ip addr show eth1 | grep inet\ | cut -d' ' -f6 | xargs ipcalc -p PREFIX=24 $ ip addr show eth1 | grep inet\ | cut -d' ' -f6 | xargs ipcalc -b BROADCAST=172.16.200.255
$ netstat -ant
$ netstat -anu
sudo nmap -sS ${IP} -p ${fromPort}-${toPort}
$ sudo nmap -sS 192.168.0.1 -p 1-1024
ip addr {add|change|replace} IFADDR dev STRING [ LIFETIME ]
$ ip addr
$ ip addr add 192.168.0.100 dev eth0
$ ip link show
$ ip neigh show
$ ip route
$ ip route add default via 192.168.0.1 $ ip route add 192.168.100.0/24 via 192.168.0.1
DEVICE=eth0 BOOTPROTO=dhcp HWADDR="NN:NN:NN:NN:NN" ONBOOT=yes
DEVICE=eth0 BOOTPROTO=static BROADCAST=192.168.1.255 HWADDR="NN:NN:NN:NN:NN" IPADDR=192.168.0.1 NETMASK=255.255.255.0 NETWORK=192.168.1.0 ONBOOT=yes GATEWAY=192.168.0.1
$ find ./ -name *.py |xargs grep -n4 "todo"
grep -vE "(dummy|127\\.0\\.0\\.1)" access_log
$ tail -f "/var/log/httpd/logs/{access,error}_log
$ watch -n3 "date '+%F %H:%M:%S'"
$ tail -f /var/log/message | grep sshd | tee -a sshd.log
$ date "+%F %H:%M:%S" | tr -d "\n" $ echo -n "hello"
$ watch -n3 "date '+%F %H:%M:%S' | tr -d '\n' >> netstat.log && \ echo -n " = " >> netstat.log && \ netstat -ant | grep "httpd" | wc -l | tee -a netstat.log"
$ cat access_log | cut -d' ' -f4-5,7
$ mv hoge foo -b "bk"