Sunday, December 16, 2007

linux common command

tcpdump -i eth1 -XX src host ip
ssh -L :localport:destinationIP:destinationPort username -pSSHPort -NnTv
sudo mount /dev/sdb1 /media/usbdisk/


iptables -t nat -D PREROUTING -s 192.168.0.140 -p tcp -m tcp --dport 3335 -j DNAT --to-destination 10.100.100.111:3068
ptables -t nat -A PREROUTING -s 192.168.0.140 -p tcp -m tcp --dport 3335 -j DNAT --to-destination 10.100.100.111:3068
sudo route add -net 10.100.0.0 mask 255.255.0.0 gw 192.168.0.24

du -h /home/engine/tomcat/ --max-depth=1
vim /etc/cron.daily/backup

sudo vim /etc/rc.local
netstat -a -n

sudo iptables-restore < /etc/iptables

tar -zxvf test.gz
tar -ztvf maskan.gz
tar -zcvf test test.gz

cut -d ' ' -f 6-6


install bin
chmod +x jre-1_5_0_14-linux-i586.rpm.bin
./jre-1_5_0_14-linux-i586.rpm.bin

sudo usermod -g admin peyman


sudo apt-get install -f
dpkg -i ymessenger.deb

install rpm
sudo rpm -Uvh jre-1_5_0_14-linux-i586.rpm

No comments: