indexing symbolic links

Alex Bligh alex at
Sun Jun 22 08:18:51 UTC 2008

--On 21 June 2008 22:03:03 -0400 Mag Gam <magawake at> wrote:

> Is there a way to index symbolic links in ext3? For example, I want to
> keep track of all symbolic links on the filesystem (soft mainly). I think
> I would have to write a wrapper around ln to keep it in a database, but I
> was wondering if anyone has done something similar to this.

How about
  find [mount point] -type l -x -print

Wrapping ln won't do the job completely as (a) it won't track the links
being removed (e.g. via rm), and (b) it won't track links being created
by programs other than ln which use the library or the system call

When you say "mainly soft", remember EVERY file /is/ a hard link. Just
some files have more than one. Look at the "-links" option to find, which
is easy enough for normal files though you will have to do a bit of thinking
re hard linked directories, "." and "..".


More information about the Ext3-users mailing list