From ab96569985d746099832081b2f4fb5922522186d Mon Sep 17 00:00:00 2001 From: David Starks-Browning Date: Wed, 29 Nov 2000 16:24:59 +0000 Subject: [PATCH] New entry "Bash says "command not found", but it's right there!" --- winsup/doc/how-using.texinfo | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/winsup/doc/how-using.texinfo b/winsup/doc/how-using.texinfo index 506e36f77..3cb6840b2 100644 --- a/winsup/doc/how-using.texinfo +++ b/winsup/doc/how-using.texinfo @@ -29,6 +29,27 @@ additional Cygwin applications that are not part of the core net release. (That is, anything not found in an ftp mirror of @code{latest} and installed by @code{setup.exe}.) +@subsection Bash says "command not found", but it's right there! + +If you compile a program, you might find that you can't run it: + +@example + bash$ gcc -o hello hello.c + bash$ hello + bash: hello: command not found +@end example + +Unlike Windows, bash does not look for programs in @samp{.} (the current +directory) by default. You can add @samp{.} to your PATH (see above), +but this is not recommended (at least on UNIX) for security reasons. +Just tell bash where to find it, when you type it on the command line: + +@example + bash$ gcc -o hello hello.c + bash$ ./hello + Hello World! +@end example + @subsection How do I convert between Windows and UNIX paths? Use the 'cygpath' utility. Type '@code{cygpath}' with no arguments to