[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 5


unlink Command

Purpose

Performs an unlink subroutine.

Syntax

unlink File

Description

The unlink command performs the unlink subroutine on a specified file.

The unlink command does not issue error messages when the associated subroutine is unsuccessful; you must check the exit value to determine if the command completed normally. It returns a value of 0 if it succeeds, a value of 1 if too few or too many parameters are specified, and a value of 2 if its system call is unsuccessful.

Attention: The unlink command allows a user with root user authority to deal with unusual problems, such as moving an entire directory to a different part of the directory tree. It also permits you to create directories that cannot be reached or escaped from. Be careful to preserve the directory structure by observing the following rules:

Example

To remove a directory entry pointed by file2, enter:

unlink file2

Files


/usr/sbin/unlink Contains the unlink command.

Related Information

The fsck command, link command, ln command.

The link subroutine, unlink subroutine.

The File Systems Overview for System Management in AIX 5L Version 5.1 System Management Concepts: Operating System and Devices explains file system types, management, structure, and maintenance.

The Files Overview in AIX 5L Version 5.1 System User's Guide: Operating System and Devices provides information on working with files.

The Directory Overview in AIX 5L Version 5.1 System User's Guide: Operating System and Devices explains working with directories and path names.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]