File:  [Research Unix] / researchv10dc / man / adm / man2 / unlink.2
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

.TH UNLINK 2
.CT 2 file_inq_creat
.SH NAME
unlink \(mi remove directory entry
.SH SYNOPSIS
.nf
.B int unlink(name)
.B char *name;
.fi
.SH DESCRIPTION
.I Unlink
removes the entry for the file pointed to by
.I 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.
.PP
Only the super-user can
.I unlink 
a directory, but see
.I rmdir
in
.IR mkdir (2).
.SH "SEE ALSO"
.IR rm (1), 
.IR link (2),
.IR mkdir (2)
.SH DIAGNOSTICS
.BR EFAULT ,
.BR EIO ,
.BR ELOOP ,
.BR ENOENT ,
.BR ENOTDIR ,
.BR EROFS

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.