Yearly Archives: 2009

Command Line Basics: Determine File MIME Types

I recently wrote a script to watermark all of the image files in a directory. Most of the images I use on this website are PNG files, but I occasionally use JPGs. The challenge in my script was to find all of the image files in the directory regardless of image type.

After a bit of web research I discovered the file command. The file command takes a list of files as input and outputs the file names along with file type. Continue reading

How To Watermark Images With ImageMagick in Linux

I recently discovered that one of my most popular posts had been poached by another blog with out providing credit – images and all. I decided that it would be best to watermark my images to make it more difficult to rip off my content.

This procedure could also be done easily in GIMP, but it takes time to open up each image and then import or create the watermark text. Instead I created my desired watermark text in GIMP and saved it as a separate file called Watermark.png. This file has a transparent background, so only the text will show up when it’s overlaid on another image. Continue reading

Nautilus Script to Launch a Terminal

I often find myself browsing my filesystem with Nautilus (the GNOME file manager) and wanting a terminal window to manipulate files in the current directory.  I decided to take a shot at writing my own Nautilus script to solve the problem. So here’s my first Nautilus script. Save it in $HOME/.gnome2/nautilus-scripts. I named it terminal-here on my system. Continue reading