The UNIX and Linux Forums
>
Top Forums
>
UNIX for Advanced & Expert Users
Is there anyway to delete a directory that has more than 200mil files?
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Is there anyway to delete a directory that has more than 200mil files?
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
06-01-2007
porter
Registered User
Join Date: Jan 2007
Posts: 2,965
use find to list the files to stdout and then use xargs to execute rm in small chunks....
Code:
find . -print | xargs -n 20 rm
Will delete all the files in the current directory in gulps of 20 at a time.
porter
View Public Profile
Find all posts by porter
Find porter's past nominations received
Find porter's present nominations given