This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [Q]Windows PATH is not working..

Hi SB,

I'm kinda new to this's what i think:

>>leesb@leesb-kr ~
>>$ which notepad

any time you access the filesystem *outside* of the cygwin install
folder (and *nix-esque file structure), cygwin uses the above format

C:\foo\bar.txt  =  /cygdrive/c/foo/bar.txt

>>leesb@leesb-kr ~
>>$ cygpath -w /cygdrive/c/WINNT/system32/notepad

>>leesb@leesb-kr ~
>>$ c:\WINNT\system32\notepad
>>bash: c:WINNTsystem32notepad: command not found

>>leesb@leesb-kr ~
>>$ c:\WINNT\system32\notepad.exe
>>bash: c:WINNTsystem32notepad.exe: command not found

bash interprets the '\' character as an escape character. If you have a
really long command for the shell, you can use the '\' to tell the shell
that when you press enter, you aren't trying to execute the command,
just get a little more room to type.

such as:
$ rsync --archive --recursive --group --owner --permissions \ [*hit

[you get a greater-than '>' on the left and keep typing]

>--exclude-file=exclusions /etc/foo /bkup/bar

and at the end, when you hit 'enter' it runs both lines as if they were
one really long line.

Cygwin also uses the '\' to handle spaces in filenames:

C:\My Documents\My Music\The Allman Brothers Band\Mountain Jam.mp3 ==>

/cygdrive/c/My\ Documents/My\ Music/The\ Allman\ Brothers\
Band/Mountain\ Jam.mp3

>>leesb@leesb-kr ~
>>$ /cygdrive/c/WINNT/system32/notepad <-- in this case, it's working

this worked because you used the format that cywin understands :-)

>>What should I look at to fix this? Any ideas?

>>Please reply all because I'm not a subscriber. Thanks.

try "A Practical Guide to Linux" by Mark G. Sobell. It's an excellent,
thorough, and easily accesible reference. It's got a great section on
the bash shell, and gets really into scripting, etc.

Good Luck!

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]