I’ve created a large tree of empty directories in an Android emulator, around 1024.
Now whenever I try to remove it with rm -rf 1/
I get a “Too many open files” error. How can I remove it?
Advertisement
Answer
- Please try to use ulimit to set the open file handle as 4000 or more, you can use “ulimit -a” to show the current limitation of open files.
- Please remove the deepest folder first, then rm them one by one