Find: -printf: unknown parameter
Possible duplicate:
Why doesn't Mac $ find have the -printf option?
Not sure what happened with the following command, but can anyone spot the error:
find public_html -name '*.php' -printf '%h \n' | sort -u > dirlist.txt
Basically, I'm trying to figure out in my public_html directories the names of all directories with the * .php extension. and then print the directory that this file is in. The result of this is sorted by channel, duplicate entries are removed using the -u flag, and the result is saved in a new dirlist.txt file
But what I get after execution is:
find: -printf: unknown option
Don't know where i go wrong
thank
+3
source to share