Simplest solution is to create an alias to the find
executable within the cmder
installation folder:
λ which find
/c/WINDOWS/system32/find
λ find --help
FIND: FIND: Parameter format not correct
λ alias find=C:\Files\Programs\cmder\vendor\git-for-windows\usr\bin\find.exe $*
λ find --help
Usage: /usr/bin/find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
May I suggest you also try out Cygwin where, among other things, find
works out of the box. That is what I used to ascertain the location of the cmder
-supplied find.exe
.
Kudos to @Bob and @AFH for their insightful comments, and to @Lưu Vĩnh Phúc for suggesting another dead-simple solution:
rename the *nix find
to another name like fnd.exe
This might actually be preferrable over creating an alias, because cmder
aliases don't work in Windows 10 unless Use legacy console
is selected in cmd
properties (see how to do it).
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%
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
.sfc /scannow
can revert itwhich -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.