Edgar Cole
asked on
The Missing Link
I have two directories named /sunquest/bin and /usr/local/bin that are, apparently, linked. When I compare their content, it is identical. The problem is that I can't figure out how they're linked. I haven't found a soft link, and information I've found elsewhere claims that hard links to directories cannot be created. Regardless, this is what the ls command is showing me...
# ls -lid /usr/local/bin
32 drwxr-xr-x 10 root system 8192 Aug 15 12:13 /usr/local/bin
# ls -lid /sunquest/bin
32 drwxr-xr-x 10 root system 8192 Aug 15 12:13 /sunquest/bin
...but when I run find like this...
find / -inum 32
... the /sunquest/bin directory shows up but /usr/local/bin does not.
# ls -lid /usr/local/bin
32 drwxr-xr-x 10 root system 8192 Aug 15 12:13 /usr/local/bin
# ls -lid /sunquest/bin
32 drwxr-xr-x 10 root system 8192 Aug 15 12:13 /sunquest/bin
...but when I run find like this...
find / -inum 32
... the /sunquest/bin directory shows up but /usr/local/bin does not.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It is a hardlink, since they are sharing the same inode and data.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'll check that out.
ASKER
I've never mounted the same device in two different places. Usually, I get an error message stating that the device is already mounted. Is this a feature of AIX?
You can't mount the same device twice on AIX, different mountpoints or not.
AIX will always tell you that the "... requested resource is busy".
And again, on AIX "/" and "/usr" are on different devices, so hardlinks between them are not possible, only symbolic links.
AIX will tell you that source and target "... are located on different file systems" if you try to hardlink them.
Moreover, hardlinks between directories are not allowed on AIX.
The error message will say that the source "... is a directory. Cannot hard link" if you try.
The identical inode numbers must be the result of some very strange hazard, otherwise I, personally, couldn't explain them.
Anyway, please double check for symbolic links!
wmp
AIX will always tell you that the "... requested resource is busy".
And again, on AIX "/" and "/usr" are on different devices, so hardlinks between them are not possible, only symbolic links.
AIX will tell you that source and target "... are located on different file systems" if you try to hardlink them.
Moreover, hardlinks between directories are not allowed on AIX.
The error message will say that the source "... is a directory. Cannot hard link" if you try.
The identical inode numbers must be the result of some very strange hazard, otherwise I, personally, couldn't explain them.
Anyway, please double check for symbolic links!
wmp
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I don't have access to the AIX system right now, but I'll check all of these things tomorrow,
ASKER
There are no "namefs" mounts.
ASKER
Unfortunately, I never really solved this riddle. It remains a mystery. Everything suggested by the experts was reasonable, just not applicable.