20141020

find files that contain string

# grep -Hirn "mystring" /path/to/dir
find . -print0 | xargs -0 -n1 -P8 grep -Hirn 

thanks to sifu enshu

20141019

error: Diskfilter writes are not supported

# cp -p /etc/grub.d/10_linux /etc/grub.d/10_linux.`date +%Y%m%d.%H%M`
# sed -i 's/quick_boot="1"/quick_boot="0"/' /etc/grub.d/10_linux
# update-grub
# reboot

share internet connection in linux via terminal


On access point side
  1. disable firewall
  2. enable packet forwarding
    # echo 1 > /proc/sys/net/ipv4/ip_forward
  3. set iptables rule for port forwarding
    # iptables -t nat -A POSTROUTING -o -j MASQUERADE
on client side:
  1. configure network interface so you can reach the access point
  2. set the access point as default gateway
    # route add default gw
  3. set dns resolution
    # echo nameserver 8.8.8.8 >> /etc/resolv.conf