Take the 2-minute tour ×

I use the command rm -rf directory but i came across the following article : Article That suggests that rsynch to an empty folder is the fastest way? rsync -a –delete empty/ a Why is this the case ? Is there another faster method to delete a nonEmpty folder ?

Another interesting article about this Article2

share|improve this question

1 Answer 1

Based on a very quick glimpse at GNU Coreutils 8.21 and rsync 3.0.1 sources plus taking a look what they do with the strace, the rm from GNU Coreutils seems to call malloc() quite a bit more than rsync does when performing the same thing. I'm doubt this explains the speed difference completely, though, but it's part of the explanation most likely.

share|improve this answer

Your Answer


