Updated : Jan 03, 2010 in Linux

Deleting a line in a file

eg. line 222 in known_hosts sed '222 d' /home/tobias/.ssh/known_hosts > /tmp/1;cp /tmp/1 /home/tobias/.ssh/known_hosts

Updated : Jan 03, 2010 in Linux

SSH Key forwarding

To be able to foreward an SSH key for ssh to server1 and from server1 ssh to server2 etc. 1) apt-get install keychain 2) use…

Updated : Jan 03, 2010 in Linux

Advanced CRONTAB

There is an easy way to start a program during system boot. Just put this in your crontab: @reboot /path/to/my/program The command will be executed…

Updated : Jan 03, 2010 in Linux

watch local network connections

----------Listen list------------- netstat -ltpn lsof -i | grep LISTEN ---------- Connection list ------- netstat -tpn lsof -i | grep ESTABLISHED

Updated : Jan 03, 2010 in Linux

Filename with date_time in it

use this command inside the name $(date +%Y.%m.%d_%H:%M:%S)

Updated : Jan 03, 2010 in Linux

Resuming an aborted scp transfer

Assume you have copied a file across the network using something like this: scp host:/path/to/file . Then assume something goes wrong, so the transfer is…

Updated : Jan 03, 2010 in Linux

Install WAP-Browser on Firefox

1. Install WML-Browser: https://addons.mozilla.org/en-US/firefox/addon/62 2. Install User Agent Switcher: https://addons.mozilla.org/en-US/firefox/addon/59 3. Install XHTML Mobile Profile: https://addons.mozilla.org/en-US/firefox/addon/1345 4. Restart Firefox 5. Download this file to your…