The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
more AIX links rayg50 AIX 3 07-30-2009 07:05 AM
About links nagalenoj UNIX for Advanced & Expert Users 1 08-20-2007 03:08 AM
AIX Links Perderabo AIX 0 04-02-2005 09:26 PM
HP-UX Links Perderabo HP-UX 0 04-02-2005 09:15 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-31-2006
uniqmaniak's Avatar
uniqmaniak uniqmaniak is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 2
Question links

how can we know the different links (hard and soft) to a file .....

i got a file in my directory and i need to know the different links attached to this file


any one plz help

thanks..
  #2 (permalink)  
Old 08-31-2006
Dhruva's Avatar
Dhruva Dhruva is offline
Registered User
  
 

Join Date: Mar 2006
Location: India
Posts: 255
hard link
Code:
ls -li /usr/bin/at
8041 -r-sr-xr-x  4 root  wheel  19540 Apr 21  2001 /usr/bin/at*
Now we will use inode number to find other links since hard links have same inode number.
Code:
find / -inum 8041 -print
For soft link enter
Code:
find /dir_path -type l
this will give you soft links in directory.
or
Code:
find /dir_path -type l -ls|awk '{ print $10,$12}'
will give soft links and associated filename

Last edited by Dhruva; 08-31-2006 at 04:38 AM..
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:42 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0