unlink (Unix)
From Wikipedia, the free encyclopedia
This article is about the Unix system call. For the mathematical concept, see unlink.
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 and Perl programming languages in the form of the unlink() built-in function. Like the Unix utility, it is also used to delete files.[3][4]
[edit] Example
To delete a file named foo, one could type:
% unlink foo
In PHP, one could use the following function to do the same:
unlink("foo");
[edit] References
[edit] See also
|
||||||||||||||||||||||||||||||||
| This computer storage-related software article is a stub. You can help Wikipedia by expanding it. |