The UNIX and Linux Forums  

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
Symbolic Links rcarnesiii AIX 1 08-17-2005 11:57 AM
list folders but not symbolic links esham Shell Programming and Scripting 7 04-14-2005 05:34 AM
cp a dty without symbolic links? JAKEZ SUN Solaris 7 09-21-2004 09:55 AM
Too many levels of symbolic links Bab00shka UNIX for Dummies Questions & Answers 2 09-19-2003 09:15 AM
Finding symbolic links mehtad UNIX for Dummies Questions & Answers 2 11-15-2001 03:26 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 03-04-2002
Registered User
 

Join Date: Mar 2002
Location: india
Posts: 3
Question Symbolic Links for a File

how do i get the list of symbolic link names for a particular file programatically
Forum Sponsor
  #2  
Old 03-04-2002
killerserv's Avatar
Unix Predator
 

Join Date: Dec 2000
Location: Phoenix, AZ
Posts: 670
b_u_n,
IN which Unix version? what variant? for which symbolic link names? Unable to identify your question as its to narrow. Pls refine your question again, with much possible data that you could provide. Recomendded to check the FAQ page too.
  #3  
Old 03-05-2002
Kelam_Magnus's Avatar
Registered User
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
You can use this find command to show all link type files in a certain directory.


find /some/directory -type l -print # this is the letter "l" not the number 1.

Should work on all types of UNIX with little syntax problems.

__________________
My brain is your brain
  #4  
Old 03-06-2002
Registered User
 

Join Date: Mar 2002
Location: india
Posts: 3
What i meant was ....

Say i have a file called a.txt

now i create links to this files
....
ln a.txt link1.txt
ln a.txt link2.txt
and so on .

note that this links can be in different directories too.

my question is , how do i get the names of all the links that a.txt have ?

I need this on AIX and Mac OS X . and want to use this in a shell script.

Thanks
  #5  
Old 03-06-2002
Kelam_Magnus's Avatar
Registered User
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
find command

I know that you can find files that have X number of links.

From the Manpage. Use these with the find command.

-links n (some number of links)

-linkedto path
True if the file is the same physical file as the file specified by path (i.e., linked to path). This primary is similar to -inum, but correctly detects when a file is hard-linked to path, even when multiple file systems are searched.


I thought that I had heard of a way to find the links to a file, but I can't remember right now.




__________________
My brain is your brain
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 02:41 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0