find hard linked files (duplicate inodes) recursively

find . -type f -printf '%10i %p\n' | sort | uniq -w 11 -d -D | less
If you have two sets of files that may share hard-linked files, it can be useful to identify which ones are hard links to same underlying inode (file). This command shows you all of those, sorted by inode#. In my example the two directory trees to compare share a common parent, so I run the command in that parent and just use find . to start from the current directory. If yours are in different locations, you can pass both paths to find: find /directory1 /directory2 -type f -printf '%10i %p\n' | sort | uniq -w 11 -d -D | less
Sample Output
 190186228 ./10/alpha1/2612_fsm
 190186228 ./12/alpha1/base/19108/2612_fsm
 190203401 ./10/alpha1/pg_internal.init
 190203401 ./12/alpha1/base/19108/pg_internal.init
 190206322 ./10/alpha1/3079_fsm
 190206322 ./12/alpha1/base/19108/3079_fsm

0
By: dmmst19
2020-09-13 22:12:58

What Others Think

After submitting this I learned about fdupes -H which is sounds like will do pretty much the same thing.
dmmst19 · 11 weeks and 5 days ago
A fascinating dialog is value remark. I feel that it is best to compose more on this matter, it may not be an unthinkable theme however generally people are insufficient to chat on such subjects. To the following. Salud. http://112.140.187.61/">Daftar joker123
muneerahmed · 8 weeks and 2 days ago
This is an amazing piece of work and gives me informative insights into the subject matter. I would love to read more about your work to enhance my knowledge. Further, to get the best https://uttercoupons.com/front/store-profile/5-off-stadium-goods-coupon
Rida · 6 weeks and 4 days ago
Rida · 6 weeks and 4 days ago
I have created this profile to make awareness about my website offerings Coupons, Coupons codes Such as https://uttercoupons.com/front/store-profile/carters-coupon-codes
Rida · 6 weeks and 4 days ago
I have created this profile to make awareness about my website offerings Coupons, Coupons codes https://uttercoupons.com/front/store-profile/covenant-eyes-coupon-code
Rida · 6 weeks and 4 days ago
I have a Website this website is for coupons. Coupons are basically used for a discount per product so I want you guys to visit my website and use the discount products. Though this website. Get the latest, trendy, and minimal price by utter coupons.such as carter coupon, Stadium goods Promo Code, TSplus Coupon, Covenant eyes coupon, FedEx poster coupon,febfitfun prom
Rida · 6 weeks and 4 days ago
This is Wiliam I have created this profile to make awareness about my website offerings Coupons, Coupons codes Such as https://uttercoupons.com/front/store-profile/fedex-office-coupon-code
Rida · 6 weeks and 4 days ago
This is Wiliam I have created this profile to make awareness about my website offerings Coupons, Coupons codes Such as https://uttercoupons.com/front/store-profile/gepur-coupon
Rida · 6 weeks and 4 days ago
This is an amazing piece of work and gives me informative insights into the subject matter. I would love to read more about your work to enhance my knowledge. Further, to get the best https://uttercoupons.com/front/store-profile/5-off-stadium-goods-coupon
Rida · 6 weeks and 4 days ago
I have created this profile to make awareness about my website offerings Coupons, Coupons codes Such as https://uttercoupons.com/front/store-profile/carters-coupon-codes
Rida · 6 weeks and 4 days ago
I have created this profile to make awareness about my website offerings Coupons, Coupons codes https://uttercoupons.com/front/store-profile/covenant-eyes-coupon-code
Rida · 6 weeks and 4 days ago
I have created this profile to make awareness about my website offerings Coupons, Coupons codes Such as https://uttercoupons.com/front/store-profile/fabfitfun-coupon-code
Rida · 6 weeks and 4 days ago
I have created this profile to make awareness about my website offerings Coupons, Coupons codes https://uttercoupons.com/front/store-profile/fedex-office-coupon-code
Rida · 6 weeks and 4 days ago
I have created this profile to make awareness about my website offerings Coupons, Coupons codes https://uttercoupons.com/front/store-profile/gepur-coupon
Rida · 6 weeks and 4 days ago
great content! will recommend this site to my friends
looneyhans · 6 weeks and 1 day ago
I am eternally on a regular basis always exclaiming that its hard to observe great help, but here is. Thanks! See More Help
wendyparis19 · 5 weeks and 6 days ago
thanks!! learned alot here and helped me alot as well. keep making these contents :D hair extensions colorado springs
looneyhans · 5 weeks and 3 days ago
thanks!! learned alot here and helped me alot as well. keep making these contents :D hair extensions colorado springs [url=https://bluestacks.red/]bluestacks[/url] [url=https://bluestacks.red/hotstar-for-pc/]hotstar for pc[/url] [url=https://omegle.red/]omegle[/url]
mikestanley464 · 3 weeks and 1 day ago
guitar lessons tulsa Can you tell me a bit more, please?
yeoyeo · 3 weeks ago
thanks for this fencingeugeneor.com
looneyhans · 1 week and 4 days ago
lovely and very nice! bathroomremodelinglaredo.com
Killersmile · 1 week and 1 day ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: