Erstatt alle forekomster av “ord1” med “ord2” i ei fil
# sed -i ‘s/ord1/ord2/g’ filnavn
A chronological documentation test project, nothing serious, really!
# sed -i ‘s/ord1/ord2/g’ filnavn
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 […]
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 […]
# mysql dbname -B -N -e “SELECT serial FROM serials” >/path/to/outfile -B or –batch: prints rows tab-separated and turns off the borders -N or –skip-column-names: leaves out the header row