Find Path by Inode For Multiple Hard Links?

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

 



Hi, 

I'm writing a simple tool to find the locations and dates of regular files on an ext4 filesystem which are unexpectedly showing up with multiple hard links (perhaps a script using "ln" without "-s" somewhere else). I'm trying to do this only in user space, and the naive approach would be that if I have a file name path with a known inode number, that I would then scan the entire partition for all files, and note when the inode matches. Then create my report based on details of each full path. What I am wondering is if there is a more efficient way (in user space) to present an inode number, and enumerate all file paths with that inode, and not have to scan the entire disk? If there is no other way I could do it the slow way, but I'm thinking someone here might know of a simple way to bypass scanning an entire partition. So far I don't know how to extract paths given an inode number other than brute force searching.

Thanks!



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux