On searching for files that have hardlinks on my Portable HDD using the following command:
$ find . ! -type d -links +1 -ls | sort -n
I get an output of the following form (there are hundreds of other files)
9336 244476 -rw------- 2 rishi rishi 250342060 Feb 18 15:48 ./unigram_mvt_0.001_9_4_0.001
This shows that the file with inode 9336 has 2 hardlinks.
On trying to locate the other one using
$ find /media/rishi/ -xdev -inum 9336
I get the output shown below
This indicates that there is only file with inode 9336
I have not created hardlinks myself. These files have been generated on my local disk from a simulation on my computer. I might have copied files for taking backups which could have created these links. The files are currently on my Portable HDD
Since I do not need this data in the near future, I was using gzip to compress it when I came across the hardlinks warning and tried to look into it.
Is the hardlink count incorrect or am I not able to locate the other hard linked file?
Filesystem is fuseblk
- Used sudo to search. Result: Same as before
- Compressed file using "gzip -f". Result: Free space on the disk increased so I guess there were no other files hardlinked
- Used find -name to check if it throws Hardlink count is wrong Warning. Result: No warning
- Checked file system. I think the problem lies here but I'm not able to resolve it
Here is the output of disk check:
$ sudo ntfsck /dev/sdb1 Unsupported: replay_log() Unsupported: check_volume() Checking 199424 MFT records. Unsupported cases found. $ sudo ntfsfix /dev/sdb1 Mounting volume... OK Processing of $MFT and $MFTMirr completed successfully. NTFS volume version is 3.1. NTFS partition /dev/sdb1 was processed successfully.
Even after running
ntfsfix, I get the same error on