Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

link(2)

rename(2)

link(1)

unlink(1)

remove(3)  —  Subroutines

OSF

NAME

remove − Removes a file

LIBRARY

Standard C Library (libc.a)

SYNOPSIS

#include <stdio.h>

int remove(
const char ∗file_name );

PARAMETERS

file_namePoints to the file to be removed. 

DESCRIPTION

The remove() function causes a file named by the string pointed to by file_name to be no longer accessible by that name.  A subsequent attempt to open that file using that name will fail unless it is created anew. 

If the file_name parameter is called on a directory, it is equivalent to calling the rmdir() function on that directory. 

NOTES

If the file operated upon by the remove() function has multiple links, the link count in the file is decremented. 

AES Support Level:
Full use

RETURN VALUES

Upon successful completion, the remove() function returns 0 (zero). Otherwise, a nonzero value is returned. 

ERRORS

Refer to the unlink() function and the rmdir() function for information on error conditions. 

RELATED INFORMATION

Functions: link(2), rename(2)

Commands: link(1), unlink(1)

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