Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When trying to run find commands in cygwin, I keep getting the error

"FIND: Parameter format not correct"

However, the same commands run on linux. What's going on?

share|improve this question
up vote 11 down vote accepted

You're using the Windows find command, not cygwin's.

This is made clear if you type 'which find'

To fix it, edit your path (System Properties -> Advanced -> Environment Variables -> System Variables -> Path) and move the entry for cygwin to the front of the path. (An easy way to do this is to copy the whole path, paste it into Notepad edit it there, and paste it back).

As pointed out in the comments, another route is to edit the bash startup scripts and change the path there. I'd even say this is the preferred solution as I've now found a case in which having cygwins versions first caused a problem.

share|improve this answer
this might not be the ideal fix; an alternative is to edit the bash startup files to prepend the Cygwin paths to the system path instead of appending them. the main difference is whether or not you want the Cygwin versions found first when running commands in the standard Windows CMD or Explorer shells. – quack quixote Mar 31 '10 at 16:00
cygwin is prepending its own paths to the global one. so its quite strange OP get that error. – akira Mar 31 '10 at 16:06
Good point quack! – dggoldst Mar 31 '10 at 17:56

I couldn't get the correct 'find' to run when in the windows' command shell, and the PATH tweaking didn't help. But this worked:

/usr/bin/find . -iname blahblah*

The explicit path fired up the right 'find', and for whatever reason, works only when running in bash.

share|improve this answer
This worked best for me. I was authoring a script that could run on various machines that already had bash. Some had the bash path before \Windows\System32, but some had it after. Also, the windows command "where find" will show you all the "find"s in path order. – PseudoNoise Sep 5 '14 at 21:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .