Monthly Archives: December 2009

A complete invisibility – anonymity – solution for Ubuntu

Based on some online articles and my previous posts, I created the following script which does the following: Generates and assigns a random MAC address to my wired card (eth0) and wireless card (wlan0) using the macchanger software described here … Continue reading

Tagged , , , | Leave a comment

Delete the last line in a text file using sed

sed -i ‘$d’ hobba -i: to change the file itself, not copy contents to another file or something$d: delete the last linehobba: the file name

Tagged , | Leave a comment

Insert a "new line" character in a text file using Bash

“echo -e “192.168.100.100\n192.168” >> hobba“  The ‘-e’ option does the magic, as it allows escape characters to be printed Source

Tagged | Leave a comment

How to delete certain lines of text from a file in Bash using sed

“sed -i 1,+2d file_name” deletes starting from line ‘1’ and the next ‘2’ lines, i.e. deletes the first 3 lines

Tagged , , | Leave a comment

Cleanup the SSH known_hosts file

“ssh-keygen -R [host] “ helpful especially in clusters

Tagged , , | Leave a comment