LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-28-2008, 11:30 AM   #1
SlowCoder
Senior Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250

Rep: Reputation: 164Reputation: 164
Getting list of hard-linked files


How can I obtain a list of hard-links within a certain folder, or within a folder's hierarchy?
 
Old 01-28-2008, 11:51 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
The command find let you to search files based on the number of hard links. Hence a starting point could be something like
Code:
find . -type f -links +1 -printf "hard-links: %n\t   inode: %i\t%p\n"
Here the -links +1 option looks for items with more than one hard link.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linked list C exvor Programming 14 06-22-2007 06:06 PM
How Do I List All Files Linked To inode? freedomics Linux - Software 1 04-24-2007 06:18 PM
C linked list exvor Programming 4 04-28-2006 05:25 AM
linked list + c dilberim82 Programming 5 05-04-2005 11:48 PM
Searching for symlinks and hard linked files mikemrh9 Linux - Software 2 04-06-2005 11:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration