10
2
I installed cmder shell emulator for Windows.
Works fine but I can't use Unix's find command. Apparently when I type:
'find .'
in the terminal it tries to use the Windows' FIND and output this error:
FIND: Parameter format not correct
I'd really like to use find, any hint on how to get it working?
1You would need to make whichever directory
find
is in appear beforeC:\Windows\System32
(where Windows' find lives) in thePATH
environment variable. This is generally considered not a great idea to do globally as it tends to confuse other programs that expect a standard Windows environment. Rather, you should see if you can set a startup script in Cmder, and make the script do something likeset PATH=C:\path\to\folder\with\unix\find;%PATH%
– Bob – 2017-06-14T10:15:21.500I don't know
cmder
, but in Linux/Unixwhich -a find
will show all programs which could execute with the find command. Identify the Unixfind
. Then use its full path, or re-arrange the order ofPATH
directories, or set an alias, ifcmder
supports this; you could also rename the Windowsfind.exe
towfind.exe
. If it emulatesbash
, then you can use the in-builttype -a find
. – AFH – 2017-06-14T10:20:45.740@AFH renaming any Windows system files is risky because Windows updates or
– phuclv – 2017-06-14T16:28:41.983sfc /scannow
can revert it1
Possible duplicate of How do I rename C:\Windows\System32\convert.exe?
– phuclv – 2017-06-15T02:31:46.577@AFH
which -a find
returns/c/WINDOWS/system32/find /usr/bin/find
. Unfortunately, though, running/usr/bin/find
yieldsThe system cannot find the path specified.
. It seems the actual windows-style path is needed here. Runningtype
launches the windowstype
, and it appearscmder
does not provide the unix-like version. – simlev – 2017-06-15T08:15:09.853@simlev - As you say, Cygwin or (if on Win10) WSL may be a better bet, though it is less easy to call native Windows programs, which may not suit the questioner. – AFH – 2017-06-15T09:23:03.703
You may wish to move
– Bob – 2017-09-01T05:47:29.733%git_install_root%
where the newPATH
is constructed ininit.bat
, see https://github.com/cmderdev/cmder/issues/37