Unlink (Unix)

unlink
Operating systemUnix and Unix-like
PlatformCross-platform
TypeCommand

In Unix-like operating systems, unlink is a system call and a command line utility to delete files. The program directly interfaces the system call, which removes the file name and (but not on GNU systems) directories like rm and rmdir.[1] If the file name was the last hard link to the file, the file itself is deleted as soon as no program has it open.[2]

It also appears in the PHP, Node.js, R, Perl and Python standard libraries in the form of the unlink() built-in function. Like the Unix utility, it is also used to delete files.[3][4][5][6]

  1. ^ "GNU Coreutils: unlink invocation". www.gnu.org.
  2. ^ "unlink". pubs.opengroup.org.
  3. ^ "PHP: unlink - Manual". php.net.
  4. ^ "unlink - perldoc.perl.org". perldoc.perl.org.
  5. ^ "File System - Node.js v13.0.1 Documentation". nodejs.org.
  6. ^ "os — Miscellaneous operating system interfaces — Python 3.8.0 documentation". python.org.