Prem's Blog ...

Wednesday, July 20, 2005

Hard Links

There is this guy who came asking on how do we search for hard links, i thought of initially writing a shell script, but then found out that our dear old unix 'find' did that job.

find . -name '*.c' -printf "%n:%i:%p \n"

(or just do a)

find . -name '*.c' -ls

%n - tells the number of hard links
%i - gives u the inode number
%p - the filename

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]



<< Home