From owner-freebsd-questions@FreeBSD.ORG Fri Nov 4 17:41:42 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58222106564A for ; Fri, 4 Nov 2011 17:41:42 +0000 (UTC) (envelope-from rjgonzale@estrads.com.ar) Received: from oproxy3-pub.bluehost.com (oproxy3.bluehost.com [IPv6:2605:dc00:100:2::a3]) by mx1.freebsd.org (Postfix) with SMTP id 01E7E8FC16 for ; Fri, 4 Nov 2011 17:41:41 +0000 (UTC) Received: (qmail 21302 invoked by uid 0); 4 Nov 2011 17:41:40 -0000 Received: from unknown (HELO box511.bluehost.com) (74.220.219.111) by oproxy3.bluehost.com with SMTP; 4 Nov 2011 17:41:40 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=estrads.com.ar; s=default; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=pPD9UZTiPoRcnbZW3dPvuy7QmGedkpDyvhbbGbEtmiA=; b=BbY0fcTQ5sana/Clieajr8vbTcMtdPP4Qxn0RnuGPratz0wj7HuSvKEDn+g1fBEPj00F4j7PqeAOpj0cuQnvSwuXAwNIl9G96NSp0I5L8W+veAh68MUHfKhmXqyBDdOJ; Received: from 20-72-231-201.fibertel.com.ar ([201.231.72.20] helo=rjgonzale-laptop.localdomain) by box511.bluehost.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RMNlr-0008Fw-Hn; Fri, 04 Nov 2011 11:41:39 -0600 Message-ID: <4EB423CD.6040702@estrads.com.ar> Date: Fri, 04 Nov 2011 14:41:33 -0300 From: Rodrigo Gonzalez User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 MIME-Version: 1.0 To: Graeme Dargie References: <0EE458C34045A44DBC2CA2DC5CEB42B5239647FE05@mercury.universe.galaxy.lcl> In-Reply-To: <0EE458C34045A44DBC2CA2DC5CEB42B5239647FE05@mercury.universe.galaxy.lcl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Identified-User: {32647:box511.bluehost.com:gonosade:estrads.com.ar} {sentby:smtp auth 201.231.72.20 authed with rjgonzale@estrads.com.ar} Cc: "freebsd-questions@freebsd.org" Subject: Re: removing directories X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2011 17:41:42 -0000 El 04/11/11 13:25, Graeme Dargie escribió: > Ok this might be a bit of a newbie question but here goes. > > I have a large number of directories around 300 which all have sub dirs, some of those have sub dirs in each of these there are two further sub dirs called pages and thumbnails, is there an easy way to remove all the pages and thumbnail dirs from the tree? > > Regards > > G > I dont know how to make in one command....but to delete thumbnails directories find . -type d -name thumbnails -exec rm -rf {} \; You can do the same for the pages directories To test what you will delete please run find . -type d -name thumbnails -print and see that it is correct