From: RISINGP1@nationwide.com
To: cygwin@cygwin.com
Subject: Re: Accessing folders elsewhere than C:\cygwin
Date: Thu, 10 Feb 2011 21:16:00 -0000 [thread overview]
Message-ID: <OF827A9B42.31F18336-ON85257833.0074A228-85257833.0074D338@lnotes-gw.ent.nwie.net> (raw)
In-Reply-To: <20110210203553.GB32475@ednor.casa.cgf.cx>
cygwin-owner wrote on 02/10/2011 03:35:53 PM:
>
> On Thu, Feb 10, 2011 at 03:23:38PM -0500, RISINGP1 wrote:
> >Eric wrote on 02/10/2011 12:15:33 PM:
> >
> >> On 02/10/2011 10:13 AM, Buchbinder, Barry (NIH/NIAID) [E] wrote:
> >> > Might the ability to identify cygwin's root be a good
> >> > thing to add to cygpath?
> >>
> >> And what's so hard about 'cygpath -w /'?
> >>
> >> > Under "System information", one could have an option
> >> >
> >> > -R, --root output cygwin root directory
> >> >
> >> > where
> >> >
> >> > $ cygpath -Rw
> >> > C:\cygwin
> >>
> >> Trading / for -R doesn't justify the bloat and burning another short
> >> option character, in my opinion.
> >
> >If you need it ofetn enough, here is a simple script for displaying the
> >cygwin root:
> >
> >case $1 in
> > -w)
> > mount | grep " / " | cut -d" " -f1 | sed 's:/:\\:g'
> > ;;
> > -u)
> > DRIVE=$(mount | grep " / " | cut -d":" -f1):
> > echo $(mount | grep "^$DRIVE " | \
> > cut -d" " -f3)$(mount | grep " / " | cut -d" " -f1) | \
> > sed 's/'$DRIVE'//'
> > ;;
> > *)
> > echo "Please specify -w (Windows) or -u (Unix)"
> > ;;
> >esac
>
> Why would we need a simple script to display the cygwin root when
> "cygpath -w /" works fine?
>
> cgf
>
OK. You are right (somehow I missed the "cygpath -w /" mention in the
thread - oops).
Change
-w)
mount | grep " / " | cut -d" " -f1 | sed 's:/:\\:g'
;;
to
-w)
cygpath -w /
;;
But "cygpath -u /" will give "/" as an answer. The script will give (for
me) "/cygdrive/c/cygwin".
I was merely trying to offer an alternative to Barry's request for the
"-R" option on cygpath. Specifically, it answers this part of his
request:
> $ cygpath -Ru
> /cygdrive/c/cygwin
>
> or, if the cygdrive prefix has been changed to a simple /,
>
> $ cygpath -Ru
> /c/cygwin
- Phil
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
next prev parent reply other threads:[~2011-02-10 21:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-09 14:46 Fergus
2011-02-09 15:38 ` Greg Chicares
2011-02-09 16:39 ` Corinna Vinschen
2011-02-10 17:13 ` Buchbinder, Barry (NIH/NIAID) [E]
2011-02-10 17:15 ` Eric Blake
2011-02-10 20:23 ` RISINGP1
2011-02-10 20:36 ` Christopher Faylor
2011-02-10 21:16 ` RISINGP1 [this message]
2011-02-09 15:50 ` Jeremy Bopp
2011-02-09 15:53 ` Jeremy Bopp
2011-02-09 15:53 ` Andrew Schulman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OF827A9B42.31F18336-ON85257833.0074A228-85257833.0074D338@lnotes-gw.ent.nwie.net \
--to=risingp1@nationwide.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).