Solved

Searching for soft-links

Posted on 2001-06-05
4
302 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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
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 …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

810 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