Photo etc

Rotate images depending on the EXIF Orientation Tag

Automatic rotation of JPG images (inclusive EXIF thumbnail) can be performed by using jhead.exe and jpegtran.exe in Windows. jhead -ft -autorot *.JPG All JPG-files in that folder will be rotated and file time (time and date of exposure) will be set according to the EXIF info.

Read More
Linux

Ten Cool Coreutils Commands

While a few commands, such as ‘cd’ are built directly into bash; many of the most important commands come from coreutils, a GNU package containing over a hundred commands. Some are the well known commands such as ‘ls’, ‘mv’ and ‘cat’. While there are some more obscure ones that are not always discovered because there […]

Read More
Scripting

Root Check

Sometime it is useful to determine if a script is being run as root or not. A simple check can be performed at the start of a script before anything important is done. The bit of code below will do this. # Check the script is being run by root if [ “$(id -u)” != […]

Read More