OS X: "command not found" error SOLVED

Started by kiwigander, April 03, 2013, 05:28:50 AM

Previous topic - Next topic

kiwigander

Hi all, I've just spent a few hours trying to install and use ExifTool and only just hit on the solution.  I thought I'd post it on the forum just in case anyone else encounters a similar situation.

Background: I am selling a Pentax *istDS and a prospective purchaser has asked what the shutter count is.  There is no way of displaying this on the Pentax itself.  One needs to use ExifTool on the most recently taken image.

I am running a MacBook Air 4,2 (late 2011), OS X 10.8.3 Mountain Lion.

I thought I had ExifTool installed already via MacPorts but in a terminal window the command exiftool invariably gave a "command not found" error.  (Same after updating MacPorts)

I installed (another instance of?) ExifTool using the Unix installation method on ExifTool's home page.  The installation went smoothly.  I tried to run exiftool from a terminal window and, once again, got the "command not found" error.

Finally I tried ~$ perl exiftool.

Success!

I wonder whether there is something in OS X 10.8 that prevents the Perl script from running unless it is prefixed by the word perl, or am I so uniquely ignorant that I didn't realise that everyone posting "exiftool <filename>" really meant "perl exiftool <filename>"?


Phil Harvey

Two things:

1) The "exiftool" script must be in your PATH for the simple "exiftool" command to work.  If it is in the current directory, you need to type "./exiftool" instead.

2) After installing, you need to either open a new Terminal window or type "rehash" in an already open window for it to be able to find the new "exiftool" in your path.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).