diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2014-09-05 19:40:39 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2014-09-05 19:40:39 +0000 |
commit | 6e16a3169fbe7c09d86d398be1a05f7e7f3ee3ad (patch) | |
tree | 6664be6017384f5cbb4fdef5b78fff3fc04ce459 /winsup/doc/pathnames.xml | |
parent | f207699a539ac11f2966631e0f1b107849b34ef4 (diff) | |
download | cygnal-6e16a3169fbe7c09d86d398be1a05f7e7f3ee3ad.tar.gz cygnal-6e16a3169fbe7c09d86d398be1a05f7e7f3ee3ad.tar.bz2 cygnal-6e16a3169fbe7c09d86d398be1a05f7e7f3ee3ad.zip |
* pathnames.xml (cygdrive): Add /proc/cygdrive description.
Diffstat (limited to 'winsup/doc/pathnames.xml')
-rw-r--r-- | winsup/doc/pathnames.xml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/winsup/doc/pathnames.xml b/winsup/doc/pathnames.xml index b694c640a..412c98f43 100644 --- a/winsup/doc/pathnames.xml +++ b/winsup/doc/pathnames.xml @@ -355,6 +355,25 @@ the cygdrive prefix, use a distinct path prefix:</para> D: /mnt/d somefs text 0 0 </screen> +<para>To simplify scripting, Cygwin also provides a +<filename>/proc/cygdrive</filename> symlink, which allows to use a fixed path +in scripts, even if the actual cygdrive prefix has been changed, or is different +between different users. So, in scripts, conveniently use the +<filename>/proc/cygdrive</filename> symlink to successfully access files +independently from the current cygdrive prefix:</para> + +<screen> + $ mount -p + Prefix Type Flags + /mnt user binmode + $ cat > x.sh <<EOF + cd /proc/cygdrive/c/Windows/System32/Drivers/etc + ls -l hosts + EOF + $ sh -c ./x.sh + -rwxrwx---+ 1 SYSTEM SYSTEM 826 Sep 4 22:43 hosts +</screen> + </sect2> <sect2 id="pathnames-symlinks"><title>Symbolic links</title> |