manpagez: man pages & more
info coreutils
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12.8 unlink: Remove files via the unlink syscall

unlink deletes a single specified file name. It is a minimalist interface to the system-provided unlink function. See (libc)Deleting Files section `Deleting Files' in The GNU C Library Reference Manual. Synopsis: It avoids the bells and whistles of the more commonly-used rm command (see section rm: Remove files or directories).

unlink filename

On some systems unlink can be used to delete the name of a directory. On others, it can be used that way only by a privileged user. In the GNU system unlink can never delete the name of a directory.

The unlink command honors the ‘--help’ and ‘--version’ options. To remove a file whose name begins with ‘-’, prefix the name with ‘./’, e.g., ‘unlink ./--help’.

An exit status of zero indicates success, and a nonzero value indicates failure.

© 2000-2018
Individual documents may contain additional copyright information.