Mailinglist Archive: opensuse (2859 mails)
| < Previous | Next > |
Re: [opensuse] Another back-up question - Over & over again
- From: Randall R Schulz <rschulz@xxxxxxxxx>
- Date: Tue, 1 May 2007 06:47:11 -0700
- Message-id: <200705010647.11731.rschulz@xxxxxxxxx>
On Tuesday 01 May 2007 03:09, Carlos E. R. wrote:
> The Monday 2007-04-30 at 22:40 -0700, Randall R Schulz wrote:
> > As I mentioned, hard links are not special entities. All directory
> > entries are hard links. The "ln" command just creates "extra" hard
> > links to the same file system entity as one referred to by an
> > existing directory entry. As such, they're not specially signified
> > in the output of any command.
>
> Well, yes, they are:
All hard links to a given entity are co-equal. Unlike symlinks, where
the target of the link and the link itself are very different things.
No one hard link is "the" file with others being somehow different or
secondary. Thus, they're not special. All file system entities (their
inodes, actually) have link counts, it's a reference-counting mechanism
used by the kernel to decide when an inode may be deallocated.
Note that "ls" has a "-i" option, which adds inode numbers to the
information displayed for each entity it lists.
> ...
>
>
> The difficult thing is to find out who the other hardlinked name is.
In the old days, we had "ncheck" which would exhaustively search a file
system for all directory entries that refer to a given inode number,
trace their parentage back to the root and print that resulting name.
Nowadays (where it appears ncheck is gone), one can use the "-samefile"
option of find:
-samefile name
File refers to the same inode as name. When -L is in effect, this can
include symbolic links.
>
> --
> Cheers,
> Carlos E. R.
Randall Schulz
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
> The Monday 2007-04-30 at 22:40 -0700, Randall R Schulz wrote:
> > As I mentioned, hard links are not special entities. All directory
> > entries are hard links. The "ln" command just creates "extra" hard
> > links to the same file system entity as one referred to by an
> > existing directory entry. As such, they're not specially signified
> > in the output of any command.
>
> Well, yes, they are:
All hard links to a given entity are co-equal. Unlike symlinks, where
the target of the link and the link itself are very different things.
No one hard link is "the" file with others being somehow different or
secondary. Thus, they're not special. All file system entities (their
inodes, actually) have link counts, it's a reference-counting mechanism
used by the kernel to decide when an inode may be deallocated.
Note that "ls" has a "-i" option, which adds inode numbers to the
information displayed for each entity it lists.
> ...
>
>
> The difficult thing is to find out who the other hardlinked name is.
In the old days, we had "ncheck" which would exhaustively search a file
system for all directory entries that refer to a given inode number,
trace their parentage back to the root and print that resulting name.
Nowadays (where it appears ncheck is gone), one can use the "-samefile"
option of find:
-samefile name
File refers to the same inode as name. When -L is in effect, this can
include symbolic links.
>
> --
> Cheers,
> Carlos E. R.
Randall Schulz
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |