Rich Freeman on 7 Aug 2012 19:25:28 -0700

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] UNIX File Equivalence

On Tue, Aug 7, 2012 at 2:40 PM, Paul Jungwirth
<> wrote:
> It sounds like using the inode number solves the equivalence problem,
> but if you want to find a canonical path to a file (e.g. for display),
> the readlink(1) command is very helpful.

Good point - when there is a violation of the rules it would be useful
to tell the user what file is responsible with more than an inode.  :)

Fortunately, the code I'll probably be modifying already has a
function to determine a canonical name - that is how it currently
checks for violations.  In fact, I might just use this mechanism as a
proof of concept initially without checking inode numbers, but I
suspect that is going to not be reliable enough.  My own system has
/usr and /var as bind mounts (root is on a small separate raid without
LVM due to grub legacy limitations when there is no initramfs - though
now I could live without that configuration), and it is always
interesting to see what kinds of paths get reported in the outputs of
various commands as a result.

Philadelphia Linux Users Group         --
Announcements -
General Discussion  --