links


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers links
# 1  
Old 08-31-2006
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  
Old 08-31-2006
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 05:38 AM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Using this site with links

Hi, I would like to use links to view that site and post messages but sometimes I have problem which rely on that it is impossible to log in here from links level. That is, I give my login and password but when I request to that being proceed there appears a site on which there is written... (2 Replies)
Discussion started by: DavidMax
2 Replies

2. AIX

List all the soft links and hard links

Hi I'm logged in as root in an aix box Which command will list all the soft links and hard links present in the server ? (2 Replies)
Discussion started by: newtoaixos
2 Replies

3. Solaris

Hard Links and Soft or Sym links

When loooking at files in a directory using ls, how can I tell if I have a hard link or soft link? (11 Replies)
Discussion started by: Harleyrci
11 Replies

4. UNIX for Advanced & Expert Users

About links

why directory has two links as default. what's the purpose? (1 Reply)
Discussion started by: nagalenoj
1 Replies

5. HP-UX

HP-UX Links

Manufacturer Links Homepage: Hewlett Packard Enterprise (HPE) (the www.hp.com is for the consumer market) Documentation: HPE QuickSpecs Support: https://support.hpe.com Community: https://community.hpe.com FreeWare The HP-UX Porting and Archive Centre (UK) FTP Servers... (0 Replies)
Discussion started by: Perderabo
0 Replies
Login or Register to Ask a Question