UNLINK(3F)
NAME
unlink − remove a file
SYNOPSIS
integer function unlink ( name )
character ∗(∗) name
DESCRIPTION
The function unlink removes the file specified by the path name name. If this is the last link to the file, the contents of the file are lost. The returned value is zero if successful, a system error code otherwise.
EXAMPLE
The following program removes the file stuff:
demo% ls
a.f other stuff
demo% cat a.f
external unlink
call unlink( ’stuff’ )
stop
end
demo% f77 a.f
a.f:
MAIN:
demo% ls
a.f a.out∗ other stuff
demo% a.out
demo% ls
a.f a.out∗ other
demo%
FILES
libF77.a
SEE ALSO
unlink(2), link(3F), perror(3F)
BUGS
Path names cannot be longer than MAXPATHLEN as defined in <sys/param.h>.
SunOS 5.0 — Last change: 07 July 1995