Linux

Backup a DVD

The following command can be used to backup/rip a DVD. All files are decrypted and stored in a folder (with the name of the DVD).

dvdbackup -i /dev/dvd -o ./ -M

If you want to create an iso file from those decrypted files you can use the following command:

mkisofs -dvd-video -udf -o ./dvd.iso ./movie_name

Tags:

# Files per Extension

Recursively lists all file extensions in the current folder and below, including a count how many files there are per extension.

find . -type f | sed 's/.*\.//' | sort | uniq -c

Tags:

Converting txt to doc

In order to convert textfiles to word documents you can use the following command

abiword --to=doc -o inputfile.doc inputfile.txt

or if you want to convert multiple files:

find *.txt -exec abiword --to=doc -o {}.doc {} \;

Tags:

ArchLinux doesn't boot anymore after updating to Gnome 3.8 - Intel Graphics

Yesterday I updated my system to Gnome 3.8. Unfortunately I was not able to boot it anymore. I would only see the boot manager but then It would just hang with a black screen. Switching to a console (Ctrl + Alt + F2) didn't work.

First of all you need to be able to work with your system. The easiest way to achieve that is starting it with runlevel 1.

Tags:

Linux Commands

Using SSH to copy files

Copy something from this system to some other system:

scp /path/to/local/file username@hostname:/path/to/remote/file

Copy something from some system to some other system:

scp username1@hostname1:/path/to/file username2@hostname2:/path/to/other/file

Copy something from another system to this system:

Tags:

Adjust Exif time of pictures

Sometimes after you come home from holidays you realize that you forgot to adjust the time of your digital camera. So all pictures might have a wrong date and/or time in the exif header. Fortunately it is pretty easy to fix that with linux:

jhead -ta10:11 *

=> Adds 10 hours and 11 minutes to the exif datetime of all files (that have exif headers) in the current folder

jhead -ta-10:11 *

=> Subtracts 10 hours and 11 minutes from the exif datetime of all files (that have exif headers) in the current folder

Tags:

Mount dm-crypt/LUKS encrypted filesystem and rewrite Grub Bootloader

If Linux (after an update) doesn't boot up anymore it might be necessary to boot into the installation using some distribution which can be booted from a cd/usb-drive (p. x. Ubuntu). The first step would then be to load the encrypted installation and maybe to rewrite the grub bootloader. The following commands can be used to do so:

cryptsetup luksOpen /dev/sda1 dm-0 mount /dev/mapper/dm-0 /mnt/temp
grub-install -- root-directory /dev/sda

Tags:

Linux Driver for Canon P-150

If you try to build the driver you might get the following error message:

make[1]: Entering directory `/home/patrick/Desktop/Canon P-150 Linux/sane-backends-1.0.19/doc'
Generating sane.ps...

kpathsea: Running mktexfmt latex.fmt
make[1]: *** [sane.ps] Error 1
make[1]: Leaving directory `/home/patrick/Desktop/Canon P-150 Linux/sane-backends-1.0.19/doc'
make: *** [all-recursive] Error 1

The problem is the documentation (does anyone read it?) so you can just disable building it. Open the make file and change line 40 from

Tags:

Evince PDF Document not supported

Sometimes after an update you might get the error "PDF Document not supported" in Evince. To see what exactly the problem is you should start it up using the command line (p. x. evince '/test.pdf'). In my case I got the following message:

Tags:

Rename Pictures based on Exif information

exiv2 -r'%Y-%m-%d %H%M :basename:' rename $(ls)
Renames all pictures in a directory. For example the file DSCF1200.jpg will be called 2011-12-30 1210 DSCF1200.jpg.

Tags:

Pages

Subscribe to RSS - Linux