Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How can I find all hard-links and soft-links?
Date: Wed, 03 Feb 2010 20:05:24
Message-Id: 201002032202.37069.alan.mckinnon@gmail.com
In Reply to: Re: [gentoo-user] How can I find all hard-links and soft-links? by Stefan Schulte
1 On Wednesday 03 February 2010 21:43:31 Stefan Schulte wrote:
2 > Hi Jarry,
3 >
4 > searching for softlinks is pretty easy:
5 >
6 > find / -type l
7 >
8 > If my understanding of hardlinks is correct you cannot say which file is
9 > the original and which file is the link.
10
11 It's worse than that - the concept of "original" and "the link" simply does
12 not exist at all.
13
14 Like invisible pink unicorns; you can't say "you can't see them so you can't
15 say if it's there or not". The truth is "There are no invisible pink unicorns"
16
17 > Both inodes just point to the
18 > same datablocks. But you can identify those files by checking the
19 > linkcount.
20 >
21 > find / -type f -links '+1'
22 >
23 > -Stefan
24 >
25 > On Wed, Feb 03, 2010 at 07:37:36PM +0100, Jarry wrote:
26 > > Hi,
27 > >
28 > > just out of curiosity: is there any quick way to find all
29 > > hard- and soft-links on a system? I just want to be sure
30 > > they were all created after I moved system from the old disk
31 > > to the new one...
32 > >
33 > > Jarry
34 >
35
36 --
37 alan dot mckinnon at gmail dot com

Replies

Subject Author
Re: [gentoo-user] How can I find all hard-links and soft-links? Stefan Schulte <stefan.schulte@×××××××××××.net>