Is unlink any faster than rm?
Both are a wrapper to the same fundamental function which is an
To weigh up the differences between the userland utilies.
You could demonstrate the difference with:
If however we're talking about an unadulterated call to the system
You can perform a system
Sorry, clarified the difference between
The slow part of removing is the filesystem code and disk stuff, not the userspace preparation of the unlink() system call.
I.e.: if the speed difference matters, then you shouldn't be storing the data on the file system.
unlink is just a rm "light". rm has more features but they do the same thing.
The portability of the outcome seems likely to be better using rm, if your script has to run across OS's.