bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MV bug.


From: Bob Proulx
Subject: Re: MV bug.
Date: Wed, 12 Jun 2002 02:21:17 -0600
User-agent: Mutt/1.3.28i

>       Hi.  I have a dir ~/camera which is actually 
>       /home/dylang/home[*]/camera
> 
> [*] This is an NFS mount.

Are there symlinks involved?

> in /home/dylang
> cd camera

At this point please include the 'pwd -P' output.

  pwd -P

That will give the canonical path independent of any symlinks.

> mv ../camera-010.jpg ./
> doesn't work.
> Even though BASH 2.04 sees ../ as /home/dylang, MV sees it as 
> /home/dylang/home  !!

Bash tracks how you got there and '..' is more like $(dirname $PWD)
than the real '..'.  Run

  help cd

And read the part about 'cd -P' versus 'cd -L'.  Try using 'cd -P'
instead and you should see what you are actually doing.

> Thus the wrong parent dir is chosen, and I curse GNU mv :(

I curse 'cd -L' being the default for bash.  ;-(

I don't have enough information here to know for sure but I am
confident that confusion over symlinks is the problem.  I answered a
similar question in the following link.  Perhaps reading it might shed
some light on your particular problem.

  http://mail.gnu.org/pipermail/bug-fileutils/1999-November/001303.html

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]