Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Nov 2010 07:20:29 +0000
From:      Pegasus Mc Cleaft <ken@mthelicon.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: removing files
Message-ID:  <201011080720.29876.ken@mthelicon.com>
In-Reply-To: <AANLkTik3_atdP6Zbg=utLEVvQLCMyz7f8RDuPU1CtXWa@mail.gmail.com>
References:  <AANLkTik3_atdP6Zbg=utLEVvQLCMyz7f8RDuPU1CtXWa@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011080720.29876.ken>