I have a partition, formatted ext4, that I want to empty completely. I will be repeating this write-then-empty process repeatedly, so I want the emptying step to be as quick as possible.
One option is to:
$ rm -rf *
But if the partition has lots of files and big ones, I've found it can take a significant amount of time.
Another option is to unmount the partition and reformat it, but I definitely prefer not taking this approach.
So, my question: Is there another way to empty a partition short of re-formatting it or traversing down the tree with rm -rf *?