jeltsch's blog

A permanent static route in Ubuntu Karmic Koala (9.10), Precise Pangolin (12.04) & Trusty Tahr (14.04)

Karmic Koala
To add a permanent static route to a Karmic Koala system with one NIC, you need to edit the
/etc/network/interfaces file. The following section needs to be replaced:

# The primary network interface
auto eth0
#iface eth0 inet dhcp

Modify as follows:
# The primary network interface
auto eth0
iface eth0 inet dhcp
up route add -net 10.8.0.0 netmask 255.255.255.0 gw 192.168.0.3
down route del -net 10.8.0.0 netmask 255.255.255.0 gw 192.168.0.3

How to determine and convert text file encoding (file, enca, iconv)

To determine the file type of the file "sample.txt" you just type:
file sample.txt
Usually it'll tell you only that it is a text file. To get to know more about the encoding type:
enca -L none sample.text
The -L switch tells the program what language is used in the file. If you don't know, just use none.
To convert the encoding from ISO-8859-1 (latin1) to UTF-8:
iconv --from-code=ISO-8859-1 --to-code=UTF-8 sample_iso8859-1.txt > sample_utf-8.txt

Pages