Linux
Read More
Erstatt alle forekomster av “ord1” med “ord2” i ei fil
# sed -i ‘s/ord1/ord2/g’ filnavn
Scripting
Read More
Dump/image CDROM to ISO file
To create an ISO image from your CD/DVD, place the media in your drive but do not mount it. If it automounts, unmount it. # dd if=/dev/cdrom of=/path/til/ISO-fil To make an ISO image from files on your hard drive, create a directory which holds the files you want. Then use the mkisofs command # mkisofs […]
Linux
Read More
Import csv data to mysql
This is a short note about how to import comma separated data, CSV, from a file into a mysql database from a shell. Log in to your mysql database and choose the database you are going to import into. Type in the following in the mysql console to import from the CSV file load data […]