I have a symbolic link from my home directory to another home directory:-
chris$ cd chris$ ls -l total 988 ... ... drwxr-xr-x 3 chris chris 4096 2010-11-20 14:33 dte lrwxrwxrwx 1 chris chris 10 2010-11-22 18:58 isbd -> /home/isbd ... ...
and, as expected, if I "cd isbd" I arrive at /home/isbd and can see its contents with an ls.
However referring to "/home/chris/isbd" sometimes produces a "No such file or directory" error (but not always, as I have just discovered). I'm stumped. What started the problem was running rsync to backup the contents of /home/chris/isbd:-
chris$ rsync /home/chris/isdb cheddar.halon.org.uk:backups/isbd rsync: link_stat "/home/chris/isdb" failed: No such file or directory (2) rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1060) [sender=3.0.7] chris$ ls /home/chris/isdb ls: cannot access /home/chris/isdb: No such file or directory chris$ cd /home/chris/isdb bash: cd: /home/chris/isdb: No such file or directory
It appears to be something to do with whether I have been in /home/chris/isbd but also seems to be time dependent. It's as if bash 'remembers' where /home/chris/isdb is for a while but then forgets unless I do a "cd isbd" from my home directory. The target (/home/isbd) is simply another part of the same disk that /home/chris is on, nothing special.
Another example sequence:-
chris$ cd /home/chris/isdb bash: cd: /home/chris/isdb: No such file or directory chris$ cd chris$ cd isbd /home/chris/isbd chris$ cd / chris$ cd /home/chris/isdb bash: cd: /home/chris/isdb: No such file or directory chris$ cd chris$ cd isbd /home/chris/isbd
I've never had this problem before with a symbolic link to a directory, what on earth is going on?
On Tue, Nov 23, 2010 at 09:01:14AM +0000, Chris G wrote:
Another example sequence:-
chris$ cd /home/chris/isdb bash: cd: /home/chris/isdb: No such file or directory chris$ cd chris$ cd isbd /home/chris/isbd chris$ cd / chris$ cd /home/chris/isdb bash: cd: /home/chris/isdb: No such file or directory chris$ cd chris$ cd isbd /home/chris/isbd
I've never had this problem before with a symbolic link to a directory, what on earth is going on?
Did no one spot the deliberate (!?) mistake, or did you think I was being so stupid it wasn't worth menitioning! :-)
The mistake is a simple typo, in some of the above I have isdb instead of isbd! Grrr, it took me ages to spot it!
On 29 November 2010 17:39, Chris G cl@isbd.net wrote:
/home/chris/isbd chris$ cd /home/chris/isdb
Did no one spot the deliberate (!?) mistake, or did you think I was being so stupid it wasn't worth menitioning! :-)
The mistake is a simple typo, in some of the above I have isdb instead of isbd! Grrr, it took me ages to spot it!
Wouldn't have tab-completion spotted that? :)
- srdjan
On Mon, Nov 29, 2010 at 05:47:52PM +0000, Srdjan Todorovic wrote:
On 29 November 2010 17:39, Chris G cl@isbd.net wrote:
/home/chris/isbd chris$ cd /home/chris/isdb
Did no one spot the deliberate (!?) mistake, or did you think I was being so stupid it wasn't worth menitioning! :-)
The mistake is a simple typo, in some of the above I have isdb instead of isbd! Grrr, it took me ages to spot it!
Wouldn't have tab-completion spotted that? :)
I was cutting and pasting from a script which didn't work (not surprisingly).