[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: listing symbolic links recursively, with dir listing

From: Eric Siegerman
Subject: Re: listing symbolic links recursively, with dir listing
Date: Thu, 18 Jan 2001 23:14:51 -0500
User-agent: Mutt/1.2.5i

On Thu, Jan 18, 2001 at 05:42:52PM -0600, Chris Garrigues wrote:
> > From:  David Glick <address@hidden>
> > Date:  Thu, 18 Jan 2001 15:36:52 -0800 (PST)
> >
> > Or you might try:
> > 
> > find . -type l -exec ls -l {} \;
> Or (depending on your version of find):
> find . -type l -ls

        find . -type l -print | xargs ls -l
might be faster, since it doesn't require a fork/exec for each
symlink (to be honest, I don't actually know how "find -ls" is
implemented; there may not be any improvement if, like xargs,
it batches them up).

This is a modification of my standard trick for getting an ls -l
with directories:
        find . -print | xargs ls -ld
(The -d is crucial!  Why is left as an exercise for the reader :-)

> (When I taught an Intro to Unix course, I recommended that my students 
> re-read 
> the find man page every few months.  Every time I re-read it, I find 
> something 
> I didn't know before.)

Quite possibly because it wasn't there before, or on the system
whose man page you were reading last time, etc.  The core
functionality is pretty standard, but people (especially GNU)
extend it in all sorts of weird and wonderful ways...


|  | /\
|-_|/  >   Eric Siegerman, Toronto, Ont.        address@hidden
|  |  /
Interviewer: You've been looking at the stars all your life:
Is there anything in astrology?
Arthur C. Clarke: It's utter nonsense.  But I'm a Sagittarius,
so I'm naturally skeptical.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]