Feeds:
Posts
Comments

Archive for November 15th, 2014

I wrote my post on deleting all *.NEF files in 2010, and never had any trouble using it… until a few weeks ago, while cleaning up a stack of memory cards with photos. The original command failed when I tried to apply the command to the current directory which was filled with .NEF and other files. No files were deleted, but the command returned a strange error message: “unknown primary or operator“. Since I’m not a shell specialist, I had to search the web for a solution, and it took me a while to find a more or less coherent explanation…

In the end, it was a FreeBSD Forum conversation that pointed the way. What you (and I in the first place) need is either

find . -type f -name '*.NEF' -exec rm -f {} \;

or

find . -type f -name \*.NEF -exec rm -f {} \;

So yes, OS X Yosemite needs the escaping of the file name pattern (with wildcard) as well as BSD, when at least two files in the current directory fit the pattern.

Read Full Post »