bug-hurd
[Top][All Lists]
Advanced

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

Re: symlinks and translators


From: Niels Möller
Subject: Re: symlinks and translators
Date: 30 Mar 2001 16:15:35 +0200

ogi@fmi.uni-sofia.bg (Ognyan Kulev) writes:

> cd /root
> settrans /linux /dev/sda5
> ln -s /linux/home/ogi/deb .
> cd deb
> cd .. (cwd = /root)
> cd deb
> ls .. (listing of /linux/home/ogi ???)

The last command is how the system really works; your current
directory (as it is known by the kernel or by the proc server) is
/linux/home/ogi/deb, and the parent of that directory (as recorded
inside the filesystem) is /linux/home/ogi, or /linux/home/ogi/deb/..
Those two are two different names (hard links) to the same directory.

cd .. works differently, because it is a builtin command of your
shell, which keeps track of your previous cd:s. It translates .. to
your internally, lying to you in order to be nice and friendly.

I think both bash and some csh-variants have this interesting feature.

And it doesn't have much to do with the Hurd, those shells work just
the same on any Un*x system.

/Niels





reply via email to

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