Search code examples
windows-7cygwin

cygwin not finding find - paths wrong


Somehow my installation of cygwin went wrong on my Win7 machine.

When I open a terminal and type find, it says

Adam@fangorn /usr/bin
$ find .
FIND: Parameter format not correct

which apparently means that the Windows find command is executing and not the cygwin one.

I know I can execute it with /usr/bin/find but last time I used cygwin I'm sure I didn't have to do that.

What do I have to do to make cygwin work for all users?

Reinstall?

ADDED:

Adam@fangorn /usr/bin
$ echo $PATH
/cygdrive/c/windows/system32:/cygdrive/c/windows:
    /cygdrive/c/windows/System32/Wbem:
    /cygdrive/c/windows/System32/WindowsPowerShell/v1.0:
    /cygdrive/c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static:
    /cygdrive/c/Program Files/Intel/WiFi/bin:
    /cygdrive/c/Program Files/Common Files/Intel/WirelessCommon:
    /cygdrive/c/Program Files/Java/jdk1.6.0_26/bin:
    /cygdrive/c/Program Files (x86)/Smart Projects/IsoBuster:
    /cygdrive/c/PROGRA~2/MICROS~1/Office:
    /usr/bin:
    /cygdrive/c/Program Files/Microsoft SQL Server/110/Tools/Binn:
    /cygdrive/d/dev/apache-maven-3.0.3/bin:
    /cygdrive/c/Program Files (x86)/Skype/Phone:
    /cygdrive/c/Program Files (x86)/QuickTime/QTSystem:
    /cygdrive/d/nodejs:
    /cygdrive/c/Program Files (x86)/DTN/IQFeed:
    /cygdrive/c/Users/Adam/AppData/Roaming/npm

ADDED FURTHER:

/etc/profile the first non-commented line is PATH="/usr/local/bin:/usr/bin:${PATH}" so it appears something has gone wrong in the start-up scripts execution. ( Thanks @matzeri )


Solution

  • check your PATH variable settings in cygwin. You must have /usr/bin before anything else

    /etc/profile defines the proper order as PATH="/usr/local/bin:/usr/bin${PATH:+:${PATH}}".

    Check if /etc/profile matches /etc/defaults/etc/profile ; if not look at the differences and eventually replace it with the default version.