Re: Ada.Directories
- From: Markus E L <development-2006-8ecbb5cc8aREMOVETHIS@xxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 21 Oct 2007 17:29:26 +0200
"Dmitry A. Kazakov" wrote:
On Sun, 21 Oct 2007 15:05:57 +0200, Jacob Sparre Andersen wrote:
Dmitry A. Kazakov wrote:
"." is not a hard/soft link,
On a Unix system it _is_ a hard link.
AFAIK, no, because you cannot unlink it:
Well, no Dmitry. It _is_ - as Jacob said - a hard link. One that
cannot be removed. Look at the link count for directories and learn
something. Why do you think it is 2+N where N is the number of
subdirectories in the directory? Think about ".." and ".".
Even when "." and ".." are not implemented as actual hard links in the
directory structure (like in AFAIR JFS) the FS code takes any effort
to maintain the illusion that there are hard links. This is part of
the interface contract (AFAIK even described in various standards).
Finally, as it should be from the very beginning! (:-))
[When links are reference counted, as IMO it is in Unix, then you obviously
cannot introduce cycles without ruining the file system.]
Certainly. That is why hardlinking directories is forbidden for the
users.
Please don't start on of your discussions on definitions now. For once
I have noticed earlier that your Unix know-how is somehow a bit
lacking and on the other side you can go against what's written in
literature (just look at a number of books on OS design and
implementation) if you like, but that will be hardly convincing.
Regards -- Markus
PS: Another thing for you to think about:
tmp/:$ ls -id t
130716 t
tmp/:$ ls -id t/.
130716 t/.
tmp/:$ ls -id t/u
130718 t/u
tmp/:$ ls -id t/u/.
130718 t/u/.
tmp/:$ ls -id t/u/..
130716 t/u/..
Hm. See a pattern (the number is the inode number, see ls(1))?
.
- References:
- Ada.Directories
- From: Dmitry A. Kazakov
- Re: Ada.Directories
- From: anon
- Re: Ada.Directories
- From: Dmitry A. Kazakov
- Re: Ada.Directories
- From: Maciej Sobczak
- Re: Ada.Directories
- From: Dmitry A. Kazakov
- Ada.Directories
- Prev by Date: Re: Ada.Directories
- Next by Date: Re: Range types
- Previous by thread: Re: Ada.Directories
- Next by thread: Re: Ada.Directories
- Index(es):
Relevant Pages
|
Loading