Mail Archives: cygwin/2003/01/28/11:51:36
Umm, I don't think this is dependent on the Windows version... My
(mostly standard, slightly edited) /etc/profile *prepends*
"/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/X11R6/bin" to the
PATH... Yours probably does too. Thus, /bin/find.exe should hide
/cygdrive/c/WINDOWS/COMMAND/find.exe (which your cygcheck output snippet
confirms).
You can always check which program will be invoked by typing "type -a
programname" in bash. For "find.exe" you should get something like:
$ type -a find.exe
find.exe is /usr/bin/find.exe
find.exe is /bin/find.exe
find.exe is /cygdrive/c/WINDOWS/COMMAND/find.exe
If you get something different as the first entry, your /etc/profile does
*append* the standard paths to the contents of $PATH. This means you've
probably changed it at some point in the past. Change it back.
Igor
On Tue, 28 Jan 2003, Hannu E K Nevalainen (garbage mail) wrote:
> NOTE: Running Win98SE
> Don't know how this affects Win<Other>
>
> on 2002-12-25 at 13:37 i wrote about a problem with $SHELL versus 'startx'
> i.e: startx won't work if $SHELL contains 'command.com' (or any DOS-stuff
> maybe?). The contents of DOS-$SHELL gets copied into bash-$SHELL -> not
> good.
>
> There is another similar problem that might be hard to cope with too:
>
> As one starts bash it apparently:
> - copies the DOS/WIN - "$PATH" contents,
> - puts them in bash-$PATH and then
> - appends any new stuff
>
> I'm not sure this behaviour is 'good'. Cause:
> 1. there is a 'find.exe' in C:\windows\command\
> bash should have problems locating '/usr/bin/find'
> 2. If you have almost any compiler installed there
> will be a 'cpp' and 'make' in one of them' paths.
>
> This is reflected by, e.g: $ cygcheck -s -v -r
> ...
> Found: c:\PROGRAM\BC31_DOS\BIN\cpp.exe
> Warning: C:\Program\cygwin\bin\cpp.exe hides c:\PROGRAM\BC31_DOS\BIN\cpp.exe
> Found: c:\PROGRAM\BC5\BIN\cpp.exe
> Warning: C:\Program\cygwin\bin\cpp.exe hides c:\PROGRAM\BC5\BIN\cpp.exe
> Found: C:\Program\cygwin\bin\find.exe
> Found: c:\WINDOWS\COMMAND\find.exe
> Warning: C:\Program\cygwin\bin\find.exe hides c:\WINDOWS\COMMAND\find.exe
> ...
> Found: C:\Program\cygwin\bin\make.exe
> Found: c:\PROGRAM\BC31_DOS\BIN\make.exe
> Warning: C:\Program\cygwin\bin\make.exe hides
> c:\PROGRAM\BC31_DOS\BIN\make.exe
> Found: c:\PROGRAM\BC5\BIN\make.exe
> Warning: C:\Program\cygwin\bin\make.exe hides c:\PROGRAM\BC5\BIN\make.exe
> ...
>
> Suggested remedy:
> a) make the DOS-PATH contents appear (or be searched) LAST in bash-PATH
> b) DON'T copy DOS-PATH contents at all
> c) Have DOS-PATH appear as MSDOSPATH in bash, have bash use it.
>
> d) temporary solution below (add "source ~/.rm_bc_paths" to ~/.profile)
> NOTE1: simple commented script to make the *problem* clear.
> NOTE2: The script contains MY PERSONAL installation paths (not the
> defaults)
>
> /Hannu E K Nevalainen, Mariefred, Sweden
>
> [~/.rm_bc_paths snipped]
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
-- /usr/games/fortune
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -