Gentoo Archives: gentoo-user

From: dhk <dhkuhl@×××××××××.net>
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 19:17:51
Message-Id: 4B69CB9C.6070309@optonline.net
In Reply to: [gentoo-user] How can I find all hard-links and soft-links? by Jarry
1 Jarry wrote:
2 > Hi,
3 >
4 > just out of curiosity: is there any quick way to find all
5 > hard- and soft-links on a system? I just want to be sure
6 > they were all created after I moved system from the old disk
7 > to the new one...
8 >
9 > Jarry
10
11
12 I think everything falls under the category of a hard or soft link. The
13 following commands may help.
14
15 This will print everything that has more than zero (one or more) links.
16 find / -links +0
17
18 This will print all symbolic links.
19 find / -type l
20
21 This should print all broken links from the current directory down:
22 notice no / or path.
23 find -L -type l
24
25 I would recommend testing these in /tmp or in a subdirectory first
26 before running them from /.
27
28 dhk