From owner-freebsd-questions Sat Jul 27 08:18:19 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA13216 for questions-outgoing; Sat, 27 Jul 1996 08:18:19 -0700 (PDT) Received: from boner.mrami.com (mramirez.sy.yale.edu [130.132.57.207]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id IAA13211 for ; Sat, 27 Jul 1996 08:18:11 -0700 (PDT) Received: (from mrami@localhost) by boner.mrami.com (8.7.5/8.6.9) id LAA06861; Sat, 27 Jul 1996 11:18:05 -0400 (EDT) Date: Sat, 27 Jul 1996 11:18:03 -0400 (EDT) From: Marc Ramirez To: Annelise Anderson cc: freebsd-questions@freebsd.org Subject: Re: Deleting a Link Farm In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Sat, 27 Jul 1996, Annelise Anderson wrote: > I've had /usr/ports linked to /cdrom/ports with lndir; in addition to > the symbolic links, quite a few regular files also existed in various > directories. > > I couldn't find any direct way to remove the links lndir created, so > I used find to find symbolic links and remove them, then found the > regular files and moved them, and finally used rm -R to get rid of > all the empty directories. > > Is there an easier way, or a way to remove only empty directories and > leave those with regular files? find /usr/ports -type l -exec rm {} \; will delete all symbolic links. Marc. -- I doubt, therefore I might be.