v perlu - velikost adresare

Dalibor Straka dast na panelnet.cz
Pondělí Květen 10 20:56:51 CEST 2004


On Mon, May 10, 2004 at 08:34:52PM +0200, Jan Houstek wrote:
> On Mon, 10 May 2004, Petr Vileta wrote:
> 
> > > 3. prostor na disku obsazeny soubory v adresari, nebo
> > > 4. jako 3, ale rekurzivne vcetne podadresaru, nebo
> 
> > No kristalovou kouli jsem zrovna pujcil sousedovi, ale zkusim odhadnout,
> > ze "velikost adresare je mnozstvi volnych bajtu, ktere by pribyly na
> > disku, kdybych ten adresar smazal" :-) tedy podle vas 4.
> 
> Budou-li v tom adresari nejake hardlinky mimo ten adresar, tak vase
> definice neni s tou citovanou moznosti 4. ekvivalentni. Cili je mozne to
> pridat jako 6. :-)
> 

Co se tyka hardlinku, tak se neda rozlisit, ktery z ukazatelu na soubor
je "ten pravy". Takze pokud smazu adresar s hardlinky, pak smazu to na co
hardlink ukazoval. Kdybych mel na jeden podadresar primountovany nejakou
partition, take bude smazana pri mazani adresare. Navic hardlinky nesmi
vest na jiny disk.

Zda se mi, ze zacinam flejmovat ;-/

vypis z manualove stranky:
A "hard link" is another name for an existing file; the link and the
original are indistinguishable.  Technically speaking, they share the
same inode, and the inode contains all the information about a
file--indeed, it is not incorrect to say that the inode _is_ the file.
On all existing implementations, you cannot make a hard link to a
directory, and hard links cannot cross filesystem boundaries.  (These
restrictions are not mandated by POSIX, however.)

-- Dalibor Straka


Další informace o konferenci Linux