Solved

Searching for soft-links

Posted on 2001-06-05
4
300 Views
Last Modified: 2010-04-21
Hi.  Can someone show me how to search my directory and all subdirectories for soft-links?

-Alex
0
Comment
Question by:Alex_Tong
4 Comments
 
LVL 38

Accepted Solution

by:
yuzh earned 10 total points
ID: 6158243
Hi  Alex_Tong,

   You cd to you home directory, then type in the following
command:

   find . -type l -print

   this will print all the soft-links file on your screen,
you can save this list to a file use:
   find .

   . stand for the current dir. If you login as ROOT, you
can print all the soft-links in your system use:

   find / -type l -print


   
0
 
LVL 6

Expert Comment

by:Talmash
ID: 6158941
hi ,

in addition :

try :
ls -l | grep lrwx at each directory :

ls -l * | grep lrwx
ls -l */* | grep lrwx
ls -l */*/* | grep lrwx
ls -l */*/*/* | grep lrwx
ls -l */*/*/*/* | grep lrwx

etc..

but this for certain deep tree .

Tal
0
 
LVL 5

Expert Comment

by:Nisus091197
ID: 6160202
... or ls -lR | grep '^lrwx'

using find is the best way.

Regards, Nisus.
http://www.omnimodo.com
0
 

Expert Comment

by:saila
ID: 6165123
if you searching soft links in all the dirs the u can use

find / -type l -ls | more

if u are searching for a particular file  the
find / -type l -ls | grep filename
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now