rm -rf is too slow on large files and directory structure(Around 30000)
I tried to remove 5GB directory. In that directory around 30000 files and directory. It will take more than 30 min to complete.
There is no other cpu intensive process running. After sometime it goes to D state and unbale to kii that process.
I have also tried find with xargs method to remove. It will also take long time to complete
find /directory | xargs rm -rf
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1116 0.1 0.0 0 0 ? D 09:10 0:25 [kdmflush]
root 1117 0.2 0.0 0 0 ? D 09:10 0:39 [kdmflush]
There have any method to speed up this process.