public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Strange symlink and mv interaction
@ 2004-02-19 23:49 Parker, Ron
  2004-02-20  1:24 ` Igor Pechtchanski
  0 siblings, 1 reply; 3+ messages in thread
From: Parker, Ron @ 2004-02-19 23:49 UTC (permalink / raw)
  To: cygwin

From inside of ~/src/myprojects I did a:

	mv -- --1.2 ~/tla--escapes--1.2

where "--1.2" was a directory in ~/src/myprojects.  This did not move
~/src/myprojects/--1.2 to ~/src/tla--escapes--1.2.  What it did do was move
it to /cygdrive/c/tla--escapes--1.2.  Here are the pertinent paths:

/			is a binary system mount of	C:\cygwin
/c			is a binary system mount of	C:\
/home			is a binary system mount of	C:\home
~			is
/home/rdparker
~/src 		is a directory,			/home/rdparker/src
~/src/myprojects	is a symlink to			/c/MyProjects

The symlink is just intended to graft my Windows source into my preferred
~/src working location for use with reasonable tools.

It appears that when mv did a ".." from ~/src/myprojects, it actually did a
.. from /c/MyProjects not from ~/src/myprojects.  Is this the expected
behavior?  I don't have a *nix system handy to check out how .. works with
symlinked directories.  I left my laptop at home today and my wife shut off
my ssh box at home because the fan was scaring her rabbit.  (Hmm... how do
small pets respond to contact with an Athlon?  I smell hasenpfeffer.  Sorry
PETA, it's been a _long_ day.)

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Strange symlink and mv interaction
  2004-02-19 23:49 Strange symlink and mv interaction Parker, Ron
@ 2004-02-20  1:24 ` Igor Pechtchanski
  0 siblings, 0 replies; 3+ messages in thread
From: Igor Pechtchanski @ 2004-02-20  1:24 UTC (permalink / raw)
  To: Parker, Ron; +Cc: cygwin

On Thu, 19 Feb 2004, Parker, Ron wrote:

> From inside of ~/src/myprojects I did a:
>
> 	mv -- --1.2 ~/tla--escapes--1.2
>
> where "--1.2" was a directory in ~/src/myprojects.  This did not move
> ~/src/myprojects/--1.2 to ~/src/tla--escapes--1.2.  What it did do was move
> it to /cygdrive/c/tla--escapes--1.2.

Tilde expansion is usually done by the shell.  However, judging from the
rest of your message, you meant the above to say

	mv -- --1.2 ../tla--escapes--1.2

More below.

> Here are the pertinent paths:
>
> /			is a binary system mount of	C:\cygwin
> /c			is a binary system mount of	C:\
> /home			is a binary system mount of	C:\home
> ~			is				/home/rdparker
> ~/src			is a directory,			/home/rdparker/src
> ~/src/myprojects	is a symlink to			/c/MyProjects
>
> The symlink is just intended to graft my Windows source into my preferred
> ~/src working location for use with reasonable tools.
>
> It appears that when mv did a ".." from ~/src/myprojects, it actually did a
> .. from /c/MyProjects not from ~/src/myprojects.  Is this the expected
> behavior?

This is the expected behavior.  The symlink takes you to the directory,
but the ".." uses the actual parent directory entry, which points to /c.
If you want this to work seamlessly, create an actual "~/src/myprojects"
directory, and use 'mount' to map /c/MyProjects to
/home/rdparker/src/myprojects.

> I don't have a *nix system handy to check out how .. works with
> symlinked directories.

The above is rather logical if you think about it.  FWIW, it does work the
same way on Linux (not surprisingly).

> I left my laptop at home today and my wife shut off my ssh box at home
> because the fan was scaring her rabbit.  (Hmm... how do small pets
> respond to contact with an Athlon?  I smell hasenpfeffer.  Sorry PETA,
> it's been a _long_ day.)

Just keep the rabbit out of the fan... :-)
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Strange symlink and mv interaction
@ 2004-02-20 13:52 Parker, Ron
  0 siblings, 0 replies; 3+ messages in thread
From: Parker, Ron @ 2004-02-20 13:52 UTC (permalink / raw)
  To: cygwin

> From: Igor Pechtchanski [mailto:pechtcha@cs.nyu.edu]

> Tilde expansion is usually done by the shell.  However, 
> judging from the
> rest of your message, you meant the above to say
> 
> 	mv -- --1.2 ../tla--escapes--1.2

I did.

> This is the expected behavior.  The symlink takes you to the 
> directory,
> but the ".." uses the actual parent directory entry, which 
> points to /c.
> If you want this to work seamlessly, create an actual 
> "~/src/myprojects"
> directory, and use 'mount' to map /c/MyProjects to
> /home/rdparker/src/myprojects.


Thanks, I don't know why I didn't do that in the first place.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-02-20 13:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-19 23:49 Strange symlink and mv interaction Parker, Ron
2004-02-20  1:24 ` Igor Pechtchanski
2004-02-20 13:52 Parker, Ron

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).