On Unix-like operating systems, the unlink command calls and directly interfaces with the unlink system function, which removes a specified file.

This page covers the GNU/Linux version of unlink.

Syntax

unlink FILE

unlink OPTION

Options

Examples

unlink hope.txt

Removes the file name hope.txt, and if there is no other hard link to the file data, the file data itself is removed from the system.

  • Syntax
  • Examples
  • Related commands
  • Linux commands help

link — Create a hard link to a regular file.