From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 4 Feb 1999 18:27:43 -0500 From: Sweth Chandramouli To: zsh-users@math.gatech.edu Subject: Re: globbing for links in pathnames Message-ID: <19990204182743.A19812@astaroth.nit.gwu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailing-List: 2091 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 / (202) 994 - 8521 (V) / (202) 994 - 0458 (F) *