unlink

The system call that removes one name from a directory and lowers the file's link count.

In more detail

rm calls unlink for each file you name. Unlinking removes a reference, not the data: the kernel frees the blocks only after the link count reaches zero and every process has closed the file. That is why a deleted log can keep using disk space until the service writing it restarts.

Related terms

Taught in

References