Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ unlink(2) — Ultrix-11 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rm(1)

link(2)

UNLINK(2)

NAME

unlink − remove directory entry

SYNOPSIS

unlink(name)
char *name;

DESCRIPTION

Name points to a null-terminated string.  Unlink removes the entry for the file pointed to by name from its directory.  If this entry was the last link to the file, the contents of the file are freed and the file is destroyed.  If, however, the file was open in any process, the actual destruction is delayed until it is closed, even though the directory entry has disappeared. 

DIAGNOSTICS

The unlink will succeed unless:

[EACCES] Search permission is denied for a component of the path prefix. 

[EACCES] Write permission is denied on the directory containing the link to be removed. 

[EBUSY] The entry to be unlinked is the mount point for a mounted file system. 

[EFAULT] Name points to an address outside the process’s allocated address space. 

[ENFILE] Insufficient system space to contain i-node. 

[ENOENT] The named file, or an element within the named file, does not exist. 

[ENOTDIR] A component of the path prefix is not a directory. 

[EPERM] The named file is a directory and the process’s effective user ID is not the superuser. 

[EROFS] The named file resides on a read-only file system. 

[ETXTBSY] The file is a pure procedure (shared text) file that is currently open for reading or writing by some process. 

SEE ALSO

rm(1), link(2)

ASSEMBLER

(unlink = 10.) 
sys unlink; name

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026