Lotsa hardlinks - how do I find the others?
I've inherited a machine with a hard link with massive counts like 78 and I need to know where the other ones are. Anybody know how to find the others?
|
Find the inode of one of the links with ls -i. Then use find /path -inum <inode number> to list all files with the same inode.
|
I tried that but nothing else turned up not even when searching the entire root filesystem. Makes me wonder if a script is running rampant somewhere (we have lots of scripts). Maybe one creates hardlinks and they were gotten rid of or something but the hard link count was not effected...
|
Quote:
Quote:
|
quite a lot, that's why I originally used -xdev and searched only the same filesystem, but then to make sure I did it again with the whole root filesystem to make sure that I wasn't missing something obvious. Still no luck.
|
Hmm, not sure what to suggest then. I suppose you could do something like 'ls -ilR / | sort | less' and eyeball the output to see if anything pops out at you. I'm not sure offhand which field would be first with -ilR (using a winduff box atm so can't check); of course you'd want to sort by inode.
|
Use fsck to verify the filesystem's integrity.
|
All times are GMT -5. The time now is 04:31 PM. |