When would one use unlink instead of rm?
[ Log in to get rid of this advertisement]
The "unlink" command can delete up to one file at a time, whereas the "rm" file can delete multiple files at once.
As far as I know, the "unlink" command uses fewer syscalls so it is better for performance. Also, "unlink" doesn't refuse to delete read-only files (chmod -w readonlyfile) whereas "rm" asks first.
Are there any other reasons I am not aware of?
|