Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: globbing for links in pathnames

On Thu, Feb 04, 1999 at 03:36:10PM -0700, Steve Talley wrote:
> Question:  I am trying to locate all directories called "man" one
> level deep, ie:
> % ls pkgs/*/man
> will do it.  The trouble is, some of these are redundant (like
> zsh-3.1.5/man and zsh/man).  Is there a way to only specify the
> links (or non-links) in the glob?  Something like
> % ls pkgs/*(@)/man

% ls pkgs/**/man(/) 

	will find _all_ directories named man below the pkgs
directory, but will _not_ follow symlinks.  (to do that, you
would do `ls pkgs/***/man(/)' instead.)  if you want to limit
your search to man directories one level deep (either so as
to not list subsequent ones, or to not waste time searching
large subdirectories that you aren't interested in), you're
probably better off using find, or some kludge like

% ls $( ls -d test/*(@) )/man(/)

	-- sweth.

Sweth Chandramouli
IS Coordinator, The George Washington University
<sweth@xxxxxxx> / (202) 994 - 8521 (V) / (202) 994 - 0458 (F)
<a href="http://astaroth.nit.gwu.edu/~sweth/disc.html";>*</a>

Messages sorted by: Reverse Date, Date, Thread, Author