From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 435 invoked from network); 23 Jan 1998 16:12:56 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 23 Jan 1998 16:12:56 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id LAA01046; Fri, 23 Jan 1998 11:01:21 -0500 (EST) Resent-Date: Fri, 23 Jan 1998 11:01:03 -0500 (EST) From: "Bart Schaefer" Message-Id: <980123080024.ZM16631@candle.brasslantern.com> Date: Fri, 23 Jan 1998 08:00:23 -0800 In-Reply-To: <19980123154701.05885@math.fu-berlin.de> Comments: In reply to Sven Guckes "finding symlinks without target" (Jan 23, 3:47pm) References: <19980123154701.05885@math.fu-berlin.de> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Sven Guckes , ZShell Users Subject: Re: finding symlinks without target MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"dpsNv.0.fF.zwBoq"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1256 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Jan 23, 3:47pm, Sven Guckes wrote: } Subject: finding symlinks without target } } Find (and print) all symbolic links without a target within the current } dirtree. file **/*(D@) | fgrep broken (You may need to change the grep if you're not using GNU `file`.) Oh, you want it all in zsh? for i in **/*(D@); [[ -f $i || -d $i ]] || echo $i But I think the pipe to fgrep would be faster. (Why isn't there a glob qualifier to chase links? **/*(@^.,@^/) would appear to be perfect, but doesn't work.) -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com