Delete files from directory: memory exhausted

Posted by codeholic on Server Fault See other posts from Server Fault or by codeholic
Published on 2010-04-06T17:59:40Z Indexed on 2010/04/06 18:03 UTC
Read the original article Hit count: 246

Filed under:
|

This question is a logical continuation of http://serverfault.com/questions/45245/how-can-i-delete-all-files-from-a-directory-when-it-reports-argument-list-too-lo

I have

drwxr-xr-x  2 doreshkin doreshkin 198291456 Apr  6 21:35 session_data

I tried

find session_data -type f -delete
find session_data -type f | xargs rm -f
find session_data -maxdepth 1 -type f -print0 | xargs -r0 rm -f

The result is the same:

find: memory exhausted

What can I do to remove this directory?

© Server Fault or respective owner

Related posts about delete

Related posts about large-directory