vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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? Any help would be appreciated............. Mark |
| |||
| 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? > > Any help would be appreciated............. > > Mark > > > find . -exec rm -f {} \; regads Andy |
| |||
| 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 |
| |||
| "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 |
| ||||
| On Thu, 6 May 2004 16:44:13 -0500, "Mark McWilliams" <mark@nospam.com> wrote: > >"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 > > > Even faster is to unmount it and run 'mkfs <filesystem>' |