View Single Post

   
  #4 (permalink)  
Old 01-04-2008, 10:29 PM
Mark McWilliams
 
Posts: n/a
Default Re: Removing ALL files from a file system


"Dan Foster" <usenet@evilphb.org> wrote in message
news:slrnc9idpc.6sh.usenet@gaia.roc2.gblx.net...
> In article <c7bbrs$9tj$3@newshispeed.ch>, Pfister Andreas

<PfisterAndreas@web.de> wrote:
> > Mark McWilliams wrote:
> >> I'm trying to remove all the files from a file system. The problem

that I'm
> >> having is that I'm trying to use the rm command and I'm getting "the
> >> parameter list is to long" because their are thousands of files in the

file
> >> system. Is their a way to remove the files and ignore the parameter

error
> >> or a way to remove all of the files from a particular file system?

> >
> > find . -exec rm -f {} \;

>
> Even faster:
>
> find /filesystem | xargs rm -f
>
> ...because it will do far fewer forks for rm than with the suggested
> solution.
>
> Fastest if possible to do is to umount filesystem, rmfs it, then
> recreate it with mklv/crfs.
>
> -Dan


Andy and Dan,

Thanks for the commands, they worked great!!!!!

Mark




Reply With Quote