* Newbie Cygdrive questions [not found] <2016125559.9964201.1391712687754.JavaMail.root@ptd.net> @ 2014-02-06 18:53 ` mrushton 2014-02-06 19:00 ` Larry Hall (Cygwin) ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: mrushton @ 2014-02-06 18:53 UTC (permalink / raw) To: cygwin Ok ... I am converting my scripts and making progress. But I have a question. My old shell software would let me have a path as : X:/INBOUND/CWSCRIPTS/myscript.sh To access this shared X drive under Cygwin it seems I have to do this : /cygdrive/X/INBOUND/CWSCRIPTS/myscript.sh Is this correct ? Is there a better way ? And C: seems to be /cygdrive/C/ -- 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Newbie Cygdrive questions 2014-02-06 18:53 ` Newbie Cygdrive questions mrushton @ 2014-02-06 19:00 ` Larry Hall (Cygwin) 2014-02-06 19:53 ` Richard 2014-02-07 0:50 ` Andrey Repin 2 siblings, 0 replies; 11+ messages in thread From: Larry Hall (Cygwin) @ 2014-02-06 19:00 UTC (permalink / raw) To: cygwin On 2/6/2014 1:53 PM, mrushton wrote: > Ok ... I am converting my scripts and making progress. > > But I have a question. > > My old shell software would let me have a path as : > > X:/INBOUND/CWSCRIPTS/myscript.sh > > > To access this shared X drive under Cygwin it seems I have to do this : > > /cygdrive/X/INBOUND/CWSCRIPTS/myscript.sh > > > Is this correct ? Is there a better way ? > > And C: seems to be /cygdrive/C/ Cygwin uses POSIX paths and this is the mechanism it uses to provide access to the drives using a POSIX path. So yes, this is the correct way to do what you want. -- Larry _____________________________________________________________________ A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Newbie Cygdrive questions 2014-02-06 18:53 ` Newbie Cygdrive questions mrushton 2014-02-06 19:00 ` Larry Hall (Cygwin) @ 2014-02-06 19:53 ` Richard 2014-02-06 22:37 ` David Conrad 2014-02-07 0:50 ` Andrey Repin 2 siblings, 1 reply; 11+ messages in thread From: Richard @ 2014-02-06 19:53 UTC (permalink / raw) To: mrushton; +Cc: cygwin On Thu, 6 Feb 2014, mrushton wrote: > > To access this shared X drive under Cygwin it seems I have to do this : > > /cygdrive/X/INBOUND/CWSCRIPTS/myscript.sh > > > Is this correct ? Is there a better way ? > > And C: seems to be /cygdrive/C/ > A BETTER way? This has nothing per se to do with Cygwin, but, briefly: Standardize all your systems on something YOU can control. For example, I always create a top-level directory called l (that's the letter, not the numeral) which stands for "local", and another called nfs, which simply means a remote mount - could be real nfs or Samba - and then make links within these directories to wherever they need to go. That way, all disk space is available via either: /l/<whatever> or /nfs/<whatever> as appropriate. And there's never any confusion over which is which - and drive letters can be completely avoided as desired, or not. ...All (many!) good System Administrators do things similar to this... Richard -- 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Newbie Cygdrive questions 2014-02-06 19:53 ` Richard @ 2014-02-06 22:37 ` David Conrad 2014-02-07 0:35 ` Mike Rushton 0 siblings, 1 reply; 11+ messages in thread From: David Conrad @ 2014-02-06 22:37 UTC (permalink / raw) To: cygwin; +Cc: mrushton It may be useful to know, if you do not already, that the cygpath utility can be used to convert between Windows and Unix paths. cygpath -u X:/INBOUND/CWSCRIPTS/myscript.sh will give you /cygdrive/x/INBOUND/CWSCRIPTS/myscript.sh, and cygpath -w /cygdrive/x/INBOUND/CWSCRIPTS/myscript.sh will give you X:\INBOUND\CWSCRIPTS\myscript.sh You can also use cygpath -m if you prefer forward slashes, even in your Windows paths. On Thu, Feb 6, 2014 at 3:03 PM, Richard <richard@karmannghia.org> wrote: > > On Thu, 6 Feb 2014, mrushton wrote: >> >> >> To access this shared X drive under Cygwin it seems I have to do this : >> >> /cygdrive/X/INBOUND/CWSCRIPTS/myscript.sh >> >> >> Is this correct ? Is there a better way ? >> >> And C: seems to be /cygdrive/C/ >> > > A BETTER way? > > This has nothing per se to do with Cygwin, but, briefly: > > Standardize all your systems on something YOU can control. For example, I > always create a top-level directory called l (that's the letter, not the > numeral) which stands for "local", and another called nfs, which simply > means a remote mount - could be real nfs or Samba - and then make links > within these directories to wherever they need to go. That way, all disk > space is available via either: > > /l/<whatever> > > or > > /nfs/<whatever> > > as appropriate. > > And there's never any confusion over which is which - and drive letters can > be completely avoided as desired, or not. > > ...All (many!) good System Administrators do things similar to this... > > Richard > > > -- > 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 > -- 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Newbie Cygdrive questions 2014-02-06 22:37 ` David Conrad @ 2014-02-07 0:35 ` Mike Rushton 0 siblings, 0 replies; 11+ messages in thread From: Mike Rushton @ 2014-02-07 0:35 UTC (permalink / raw) To: David Conrad, cygwin That is good to know about that utility Cygpath. Maybe I will try it. What I was doing was going thru some scripts ... changing the paths ... clean in up stuff ... over the years I ended up with a lot of commented out sections of code ... and testing them. And this is a different approach that I never would have thought of. /l/<whatever> or /nfs/<whatever> Thanks. On 2/6/2014 5:37 PM, David Conrad wrote: > It may be useful to know, if you do not already, that the cygpath > utility can be used to convert between Windows and Unix paths. > > cygpath -u X:/INBOUND/CWSCRIPTS/myscript.sh > > will give you /cygdrive/x/INBOUND/CWSCRIPTS/myscript.sh, and > > cygpath -w /cygdrive/x/INBOUND/CWSCRIPTS/myscript.sh > > will give you X:\INBOUND\CWSCRIPTS\myscript.sh > > You can also use cygpath -m if you prefer forward slashes, even in > your Windows paths. > > > On Thu, Feb 6, 2014 at 3:03 PM, Richard <richard@karmannghia.org> wrote: >> On Thu, 6 Feb 2014, mrushton wrote: >>> >>> To access this shared X drive under Cygwin it seems I have to do this : >>> >>> /cygdrive/X/INBOUND/CWSCRIPTS/myscript.sh >>> >>> >>> Is this correct ? Is there a better way ? >>> >>> And C: seems to be /cygdrive/C/ >>> >> A BETTER way? >> >> This has nothing per se to do with Cygwin, but, briefly: >> >> Standardize all your systems on something YOU can control. For example, I >> always create a top-level directory called l (that's the letter, not the >> numeral) which stands for "local", and another called nfs, which simply >> means a remote mount - could be real nfs or Samba - and then make links >> within these directories to wherever they need to go. That way, all disk >> space is available via either: >> >> /l/<whatever> >> >> or >> >> /nfs/<whatever> >> >> as appropriate. >> >> And there's never any confusion over which is which - and drive letters can >> be completely avoided as desired, or not. >> >> ...All (many!) good System Administrators do things similar to this... >> >> Richard >> >> >> -- >> 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 >> -- 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Newbie Cygdrive questions 2014-02-06 18:53 ` Newbie Cygdrive questions mrushton 2014-02-06 19:00 ` Larry Hall (Cygwin) 2014-02-06 19:53 ` Richard @ 2014-02-07 0:50 ` Andrey Repin 2014-02-07 1:05 ` Mike Rushton 2 siblings, 1 reply; 11+ messages in thread From: Andrey Repin @ 2014-02-07 0:50 UTC (permalink / raw) To: mrushton, cygwin Greetings, mrushton! > Ok ... I am converting my scripts and making progress. > But I have a question. > My old shell software would let me have a path as : > X:/INBOUND/CWSCRIPTS/myscript.sh > To access this shared X drive under Cygwin it seems I have to do this : > /cygdrive/X/INBOUND/CWSCRIPTS/myscript.sh > Is this correct ? Is there a better way ? > And C: seems to be /cygdrive/C/ The true answer is - "depends"... If you do not need interoperation between Cygwin and pure Windows stuff, you could use either scheme, but the latter is preferred under Cygwin banner. In case you DO need to work with Windows tools, the former scheme would satisfy both worlds. (Windows does not see a difference betwen \ and / as directory separators on the very low level, but this matters for a lot of Cygwin tools.) -- WBR, Andrey Repin (anrdaemon@yandex.ru) 07.02.2014, <04:33> Sorry for my terrible english... -- 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Newbie Cygdrive questions 2014-02-07 0:50 ` Andrey Repin @ 2014-02-07 1:05 ` Mike Rushton 2014-02-07 3:09 ` Larry Hall (Cygwin) 2014-02-07 13:05 ` Andrey Repin 0 siblings, 2 replies; 11+ messages in thread From: Mike Rushton @ 2014-02-07 1:05 UTC (permalink / raw) To: Andrey Repin I see. What would you say to this ? I have to use an EDI translator - it runs under windows/dos and had unix versions I was trying this ... but the program needed to see the path of a config file ... after the -cp switch. /cygdrive/c/gentran61SA/lftran /cygdrive/c/gentran61sa/data/EDN -id -cp /cygdrive/c/Gentran61SA It gave me errors can not open file /cygdrive/c/Gentran61SA\ediprim.cfg. It was like the program could not figure out what style of paths to use. I changed it to : (escape out of bash and run this code) ! c:/gentran61SA/lftran c:/gentran61sa/data/EDN -id -cp c:/Gentran61SA and it worked perfectly. Is there a better way to do this ? On 2/6/2014 7:39 PM, Andrey Repin wrote: > Greetings, mrushton! > >> Ok ... I am converting my scripts and making progress. >> But I have a question. >> My old shell software would let me have a path as : >> X:/INBOUND/CWSCRIPTS/myscript.sh > >> To access this shared X drive under Cygwin it seems I have to do this : >> /cygdrive/X/INBOUND/CWSCRIPTS/myscript.sh > >> Is this correct ? Is there a better way ? >> And C: seems to be /cygdrive/C/ > The true answer is - "depends"... > If you do not need interoperation between Cygwin and pure Windows stuff, you > could use either scheme, but the latter is preferred under Cygwin banner. > In case you DO need to work with Windows tools, the former scheme would > satisfy both worlds. (Windows does not see a difference betwen \ and / as > directory separators on the very low level, but this matters for a lot of > Cygwin tools.) > > > -- > WBR, > Andrey Repin (anrdaemon@yandex.ru) 07.02.2014, <04:33> > > Sorry for my terrible english... > > -- 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Newbie Cygdrive questions 2014-02-07 1:05 ` Mike Rushton @ 2014-02-07 3:09 ` Larry Hall (Cygwin) 2014-02-07 3:52 ` Mike Rushton 2014-02-07 13:05 ` Andrey Repin 1 sibling, 1 reply; 11+ messages in thread From: Larry Hall (Cygwin) @ 2014-02-07 3:09 UTC (permalink / raw) To: cygwin On 2/6/2014 8:05 PM, Mike Rushton wrote: > I see. > > > What would you say to this ? > > I have to use an EDI translator - it runs under windows/dos and had unix > versions > > I was trying this ... but the program needed to see the path of a config > file ... after the -cp switch. > > /cygdrive/c/gentran61SA/lftran /cygdrive/c/gentran61sa/data/EDN -id -cp > /cygdrive/c/Gentran61SA > > > It gave me errors can not open file /cygdrive/c/Gentran61SA\ediprim.cfg. It > was like the program could not figure out > what style of paths to use. > > I changed it to : (escape out of bash and run this code) > > ! c:/gentran61SA/lftran c:/gentran61sa/data/EDN -id -cp c:/Gentran61SA > > and it worked perfectly. Is there a better way to do this ? Well, as I said before, Cygwin really prefers POSIX paths. But, as you've found out, non-Cygwin programs won't understand POSIX paths. If you need to interact with non-Cygwin programs, you'll either want to translate the paths you send to them back to DOS-style paths with cygpath, set up links that both Windows and Cygwin will understand without translation, or live somewhat dangerously and use the path-style you found above. I'm sure there are other flavors you could find that could also work, at least in some cases. The cygpath route is the one approach that fully supports POSIX paths and DOS-style paths. -- Larry _____________________________________________________________________ A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Newbie Cygdrive questions 2014-02-07 3:09 ` Larry Hall (Cygwin) @ 2014-02-07 3:52 ` Mike Rushton 2014-02-07 13:05 ` Andrey Repin 0 siblings, 1 reply; 11+ messages in thread From: Mike Rushton @ 2014-02-07 3:52 UTC (permalink / raw) To: cygwin Good ... I will have to work with that Cygpath and see what kind of results that I get. I am unsure how this program is going to respond. I may have to just do the shell escape and execute the invocation of gentran if the program can not figure out where the location of its configuration files should be. Now I see that Cygwin has a C compiler ... I will have to play with this a little later - I may be able to find a use for this. What about a Secure Shell client to transfer files and to get a secure session going, does Cygwin have that ? I see other people's emails about ssh but am not sure if this is what I am looking for. This Cygwin is a great package to work with. I have been programming in some sort of shell script since 1992. On 2/6/2014 10:09 PM, Larry Hall (Cygwin) wrote: > On 2/6/2014 8:05 PM, Mike Rushton wrote: >> I see. >> >> >> What would you say to this ? >> >> I have to use an EDI translator - it runs under windows/dos and had unix >> versions >> >> I was trying this ... but the program needed to see the path of a config >> file ... after the -cp switch. >> >> /cygdrive/c/gentran61SA/lftran /cygdrive/c/gentran61sa/data/EDN -id -cp >> /cygdrive/c/Gentran61SA >> >> >> It gave me errors can not open file >> /cygdrive/c/Gentran61SA\ediprim.cfg. It >> was like the program could not figure out >> what style of paths to use. >> >> I changed it to : (escape out of bash and run this code) >> >> ! c:/gentran61SA/lftran c:/gentran61sa/data/EDN -id -cp c:/Gentran61SA >> >> and it worked perfectly. Is there a better way to do this ? > > Well, as I said before, Cygwin really prefers POSIX paths. But, as > you've > found out, non-Cygwin programs won't understand POSIX paths. If you need > to interact with non-Cygwin programs, you'll either want to translate the > paths you send to them back to DOS-style paths with cygpath, set up links > that both Windows and Cygwin will understand without translation, or live > somewhat dangerously and use the path-style you found above. I'm sure > there are other flavors you could find that could also work, at least in > some cases. The cygpath route is the one approach that fully supports > POSIX paths and DOS-style paths. > -- 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Newbie Cygdrive questions 2014-02-07 3:52 ` Mike Rushton @ 2014-02-07 13:05 ` Andrey Repin 0 siblings, 0 replies; 11+ messages in thread From: Andrey Repin @ 2014-02-07 13:05 UTC (permalink / raw) To: Mike Rushton, cygwin Greetings, Mike Rushton! > What about a Secure Shell client to transfer files and to get a secure > session going, does Cygwin have that ? I see other people's emails > about ssh but am not sure if this is what I am looking for. It is. -- WBR, Andrey Repin (anrdaemon@yandex.ru) 07.02.2014, <16:56> Sorry for my terrible english... -- 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Newbie Cygdrive questions 2014-02-07 1:05 ` Mike Rushton 2014-02-07 3:09 ` Larry Hall (Cygwin) @ 2014-02-07 13:05 ` Andrey Repin 1 sibling, 0 replies; 11+ messages in thread From: Andrey Repin @ 2014-02-07 13:05 UTC (permalink / raw) To: Mike Rushton, cygwin Greetings, Mike Rushton! Please don't http://cygwin.com/acronyms/#TOFU > What would you say to this ? > I have to use an EDI translator - it runs under windows/dos and had unix > versions If it have UNIX version, perhaps, a Cygwin package for it exists, or it can be compiled. > I was trying this ... but the program needed to see the path of a config > file ... after the -cp switch. > /cygdrive/c/gentran61SA/lftran /cygdrive/c/gentran61sa/data/EDN -id -cp /cygdrive/c/Gentran61SA As one of possible solutions: /cygdrive/c/gentran61SA/lftran "$( cygpath -lw /cygdrive/c/gentran61sa/data/EDN )" -id -cp "$( cygpath -lw /cygdrive/c/Gentran61SA )" > It gave me errors can not open file /cygdrive/c/Gentran61SA\ediprim.cfg. It was like the program could not figure out > what style of paths to use. > I changed it to : (escape out of bash and run this code) > ! c:/gentran61SA/lftran c:/gentran61sa/data/EDN -id -cp c:/Gentran61SA > and it worked perfectly. Is there a better way to do this ? "Better" in this case is subjective. -- WBR, Andrey Repin (anrdaemon@yandex.ru) 07.02.2014, <16:50> Sorry for my terrible english... -- 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-02-07 13:05 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <2016125559.9964201.1391712687754.JavaMail.root@ptd.net> 2014-02-06 18:53 ` Newbie Cygdrive questions mrushton 2014-02-06 19:00 ` Larry Hall (Cygwin) 2014-02-06 19:53 ` Richard 2014-02-06 22:37 ` David Conrad 2014-02-07 0:35 ` Mike Rushton 2014-02-07 0:50 ` Andrey Repin 2014-02-07 1:05 ` Mike Rushton 2014-02-07 3:09 ` Larry Hall (Cygwin) 2014-02-07 3:52 ` Mike Rushton 2014-02-07 13:05 ` Andrey Repin 2014-02-07 13:05 ` Andrey Repin
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).