Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Searching for soft-links

Posted on 2001-06-05
4
Medium Priority
?
309 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 38

Accepted Solution

by:
yuzh earned 40 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.
Suggested Courses

604 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