in reply to Re^3: What script is this, and where is it? (Re: who am I?)
in thread who am I?
*cough* ... look again.
/var/tmp/otherdir/symdir/../datadir' => '/var/tmp/otherdir/datadir'
I read it fine the first time.
/var/tmp/otherdir/symdir/../datadir
is equivalent to
/var/tmp/datadir
and not equivalent to
/var/tmp/otherdir/datadir
In "/var/tmp/otherdir/symdir/../datadir", the ".." is that of "mydir" which is a hard link to "/var/tmp".
Do like I did and test before contradicting someone.
$ cd /var/tmp $ mkdir mydir $ mkdir datadir $ mkdir otherdir $ touch mydir/in_mydir $ touch datadir/in_datadir $ touch otherdir/in_otherdir $ cd otherdir $ ln -s ../mydir symdir $ ls /var/tmp/otherdir/symdir/../datadir in_datadir $ perl -le'opendir $dh, $ARGV[0] or die; print for grep /in/, readdir +$dh' /var/tmp/otherdir/symdir/../datadir in_datadir
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: What script is this, and where is it? (Re: who am I?)
by massa (Hermit) on Sep 25, 2008 at 00:26 UTC | |
by ikegami (Patriarch) on Sep 25, 2008 at 01:02 UTC | |
by repellent (Priest) on Sep 25, 2008 at 02:55 UTC | |
by TGI (Parson) on Oct 01, 2008 at 21:53 UTC | |
|
Re^5: What script is this, and where is it? (Re: who am I?)
by AZed (Monk) on Sep 25, 2008 at 00:53 UTC | |
by massa (Hermit) on Sep 25, 2008 at 01:07 UTC | |
by AZed (Monk) on Sep 25, 2008 at 01:36 UTC | |
by ikegami (Patriarch) on Sep 25, 2008 at 01:03 UTC |