From owner-freebsd-questions@FreeBSD.ORG Mon Nov 8 07:20:46 2010 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 681D01065674 for ; Mon, 8 Nov 2010 07:20:46 +0000 (UTC) (envelope-from ken@mthelicon.com) Received: from hercules.mthelicon.com (hercules.mthelicon.com [IPv6:2001:49f0:2023::2]) by mx1.freebsd.org (Postfix) with ESMTP id 321E58FC0A for ; Mon, 8 Nov 2010 07:20:46 +0000 (UTC) Received: from feathers.peganest.com (feathers.peganest.com [78.33.110.3]) (authenticated bits=0) by hercules.mthelicon.com (8.14.3/8.14.3) with ESMTP id oA87KU7T000781 for ; Mon, 8 Nov 2010 07:20:30 GMT (envelope-from ken@mthelicon.com) From: Pegasus Mc Cleaft Organization: Feathers To: freebsd-questions@freebsd.org Date: Mon, 8 Nov 2010 07:20:29 +0000 User-Agent: KMail/1.13.5 (FreeBSD/9.0-CURRENT; KDE/4.5.3; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201011080720.29876.ken@mthelicon.com> X-Spam-Status: No, score=-1.9 required=15.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on hercules.mthelicon.com Subject: Re: removing files 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: Mon, 08 Nov 2010 07:20:46 -0000 On Monday 08 November 2010 06:10:20 yoganjaneyulu kasetti wrote: > hi, > > I have a problem for deleting files using script........please some one can > guide me for the same. > > I have some files with the extension of ".chk" extension along with the > extension of ".log" and ".gjf" extension in the folder called different > *input folders. *I wanted to delete the ".chk" file extension having > files. If i go to individual input folder manually i can delete the file > with *rm* command line by but i would like to delete all the ".chk" files > extension files at a time through scripting rather than manual. So please > some one help me for the same. > /student/sweety/gaussiandata/*1249624064640*/input > Could you, in your script do something like: cd /Path_to_Data_Root find . -name "*.chk" -print -prune -exec rm -rf {} \; Peg