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

re-linking hard links



Hello, 


I have a situation where I have numerous files with numerous hard links 
to each of them on an ext3 RHEL4.2 system.  Some of these files are 
duplicates of the others.  I would like to re-link all of the 
duplicates to point to a single inode.  For instance if file1 has 
hardlinks link1 and link2, and file2 has hardlinks link3 and link4, I 
need to change it so that link1, link2 (these two are already correct), 
file2, link3, and link4 are all hardinks to file1.  The only 
information I have to start with are the inode numbers of file1 and 
file2 and the pathnames of file1 and file2. 


Any ideas beyond searching all of the filenames on the system and 
replacing them with the proper link?  That takes a long time. 


thanks, 


Dan 



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