Command Line

EXIF Manipulation on the Linux commandline

I use jhead for manipulating EXIF data, renaming files and mogrify for
compressing the JPEG’s

the following command will rename all .jpg files in the current folder
to their corresponding “date taken” stamp in the format YYYYMMDD-HHMMSS

jhead -n%Y%m%d-%H%M%S *.jpg

Sometimes you have multiple cameras at a happy occasion, and wish to
collect all the images. But alas, one or more of the cameras have
their clock set to UTC, daylight savings time (winter when it is summer)
or similar. This will create annoyance as the images will not appear
fortunately you kan find the “sinner” and adjust the time with jhead
in a this way:

jhead *.jpg | grep "IXUS 700" -b4 | \
grep "File name" | sed "s/.*: //" | xargs jhead -ta+1

WARNING: This step is optional, just because I cannot tell the difference
between compressed and uncompressed images, maybe you can. A backup is
therefore recommended

The compression on digital cameras are not very efficient, and this
leads to large JPEG image files on your harddisk.
Fortunately you can use “mogrify” to cut JPEG’s down in size with

jhead -cmd "mogrify -quality 80 &i" *.jpg

How to install LabVIEW on a Debian Machine

Labview ships prepackaged to install on rpm based Linux machines (Redhat, Mandrake and so on). But it is quite simple to convert and install it on a Debian machine instead.

The machine I will be using is a Thinkpad T40 with Debian Lenny installed, it should be the same for the current stable (Etch) but this is yet to be confirmed.

First we need to install alien

# aptitude install alien

The conversion process is quite simple, all you have to is to type

# alien -d *.rpm

And after some time (about 15 minutes or so on my laptop) you should be left with a bunch of .deb files.

You might have guessed it.. to install:

# dpkg -i *.deb

Now for the hacking part, when you try to run Labview all you get is this error:

/usr/local/natinst/LabVIEW-8.2/labview: symbol lookup error: /usr/local/natinst/LabVIEW-8.2/linux/ undefined symbol: _glapi_add_entrypoint

To work around this you need to install libosmesa (of current writing libosmesa6)

# aptitude install libosmesa6

and relink

# (cd /usr/local/natinst/LabVIEW-8.2/linux; rm; ln -s /usr/lib/

And it works! If you feel like it, you can also put a little icon on your desktop or in your Applications menu (this part is for gnome), this is the contents of the labview.desktop file with my corrections. It originates from /usr/local/natinst/LabVIEW-8.2/linux/gnome/gnome/apps/Applications/labview82.desktop and there is a similar file for KDE in the /usr/local/natinst/LabVIEW-8.2/linux/kde folder for those who want to make a KDE shortcut.
Contents of labview82.desktop

[Desktop Entry]
Name=LabVIEW 8.2
Comment=LabVIEW Graphical Dataflow Programming Environment

This file can be placed either in ~/.local/share/applications/ or in /usr/share/applications

Fjern Thumbs.db filer fra dit system

Windows genererer som standard en thumbnail database i en mappe med billeder, disse bliver så distribueret med når mapperne efterfølgende bliver brændt ned på skiver, komprimeret eller bare distribueret via nettet.

Der findes en kur

$ find ~ -name 'Thumbs.db' -print0 | xargs -0 rm -v >> rm.log

Find terminierer hver linie med en null karakter, og xargs bygger en argumentliste sepereret ved null karakteren, og sender listen til rm. -v argumentet beder rm om output som vi så skriver til rm.log