I usually remove an entire directory at once with
rm -rf. I noticed just now that this takes longer the larger the directory is (reckoned recursively).
Do unix-like systems expose an alternative way to delete a directory that operates in constant time? It seems it should be possible to remove a directory 'directly', without touching the contents at all, which are now inaccessible.
Is there some characteristic of file systems that forces you to recursively walk the contents of a directory in order to delete the directory itself?