On Wed, Sep 7, 2011 at 10:45 PM, Mark Galeck (CW) <[email protected]> wrote:
>>>ln -s dir1/foobar1 dir/foobar
>
>  >works as expected.
>
> Philip wrote:
>>No, it doesn't.
>
> Yes it does!
>
> mgaleck@rh5-017205{531}: ls -d dir*
> dir  dir1
> mgaleck@rh5-017205{532}: ls dir1
> foobar1
> mgaleck@rh5-017205{533}: ln -s dir1/foobar1 dir/foobar
> mgaleck@rh5-017205{534}: ls -l dir/foobar
> lrwxrwxrwx 1 mgaleck sw-team 12 Sep  7 22:42 dir/foobar -> dir1/foobar1
> mgaleck@rh5-017205{535}:

How many commands did you run that actually *open* dir/foobar?

$ cd /tmp/f
$ l
total 4
drwxrwxr-x  2 guenther  wheel  512 Sep  7 23:18 .
drwxrwxrwt  7 root      wheel  512 Sep  7 22:26 ..
$ mkdir dir dir1
$ echo "this is dir1" > dir1/foobar1
$ mkdir dir/dir1
$ echo "surprise, this is dir/dir1" > dir/dir1/foobar1
$ ln -s dir1/foobar1 dir/foobar
$ ls -d dir*
dir  dir1
$ ls -l dir/foobar
lrwxrwxr-x  1 guenther  wheel  12 Sep  7 23:19 dir/foobar -> dir1/foobar1
$ cat dir/foobar
surprise, this is dir/dir1
$ cd dir
$ cat foobar
surprise, this is dir/dir1
$ cd ../..
$ cat f/dir/foobar
surprise, this is dir/dir1
$


So, what EFFECTIVE FULL PATH does dir/foobar point to?  Is that what
you intended it to point to?


Philip Guenther

_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to