I want to add some dirs to my PATH. Unfortunately these dirs are located in windows path containing space (like the Documents and Settings)
I've unsuccessfully tried to:
Create a variable:
43598811@E250BZD20015026 ~ $ winhome="/cygdrive/c/Documents\ and\ Settings/43598811/" 43598811@E250BZD20015026 ~ $ cd $winhome bash: cd: /cygdrive/c/Documents\: No such file or directory 43598811@E250BZD20015026 ~ $ cd "$winhome" bash: cd: /cygdrive/c/Documents\ and\ Settings/43598811/: No such file or directory
Create an alias:
43598811@E250BZD20015026 ~ $ alias winhome="/cygdrive/c/Documents\ and\ Settings/43598811/" 43598811@E250BZD20015026 ~ $ winhome bash: /cygdrive/c/Documents and Settings/43598811/: is a directory 43598811@E250BZD20015026 ~ $ cd winhome bash: cd: winhome: No such file or directory
Use a soft link: it is working... but I don't want to use this
Any suggestion ?
From the Start menu, select Parameters > Control Panel > System. Select the Advanced tab and click Environment variables. Edit the PATH environment variable to add the Cygwin installation directory, for example c:\cygwin\bin; and click OK.
I.e. DOS C: drive can be accessed in Cygwin by /cygdrive/c, D: as /cygdrive/d, etc. To display the contents of the current directory, you can use ls or dir commands. ls -la will provide more details, including file access permissions, size and modification date.
The PATH environment variable is used by Cygwin applications as a list of directories to search for executable files to run.
The Cygwin DLL supports user specific fstab files. These are stored in the directory /etc/fstab. d and the name of the file is the Cygwin username of the user, as it's created from the Windows account database or stored in the /etc/passwd file (see the section called “Mapping Windows accounts to POSIX accounts”).
This works:
$ winhome="/cygdrive/c/Documents and Settings/" $ cd "$winhome" $ pwd /cygdrive/c/Documents and Settings
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With