Remove Link (RMVLNK)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Remove Link (RMVLNK) command removes the link to the specified object. If this is the only hard link to the object, the object is removed when no longer in use. The object can be removed even if a symbolic link to it exists. The symbolic link remains until it is removed.

This command can also be issued using the following alternative command names:

For more information about integrated file system commands, see the Integrated file system information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.

Restrictions:

  1. In the "root" (/), QOpenSys, and user-defined file systems, the user must have write, execute (*WX) authority to the directory containing the object. If a hard link is to be unlinked, the user must also have object existence (*OBJEXIST) authority to the object.

  2. In the QDLS file system, the user must have all (*ALL) authority to the object and execute (*X) authority to the parent directory.

  3. The user must have *X authority to each directory in the path.

  4. See the iSeries Security Reference, SC41-5302 book for the authority requirements for other file systems.

  5. A user cannot unlink an object within a "root" (/), QOpenSys, or user-defined file system directory that has the "restricted rename and unlink" attribute set on (this attribute is equivalent to the S_ISVTX mode bit) unless one or more of the following are true:

    1. The user is the owner of the object.

    2. The user is the owner of the directory.

    3. The user has all object (*ALLOBJ) special authority.

  6. A directory cannot be unlinked.

  7. The link to a file cannot be removed if the file is a DataLink column in an SQL table and where a row in that SQL table references this file.

  8. The restrictions listed above are for the i5/OS objects of the types *DDIR, *DSTMF, *SOCKET, *STMF, and *SYMLNK.

QSYS.LIB and independent ASP QSYS.LIB File System Differences

  1. If this command is to be used to remove links for an object that is in these file systems, additional restrictions may apply. To identify these restrictions, see the delete command for the object to be removed. In general, the name of this command is formed using the i5/OS object type value, from the character * is removed, and add the verb DLT to the beginning. For example, to delete an alert table, which has the object type value of *ALRTBL, see the Delete Alert Table (DLTALRTBL) command for any additional restrictions.

    However, there are exceptions to this rule. For example, to delete a compiler unit, which has the object type value of *MODULE, see the Delete Module (DLTMOD) command for any additional restrictions.

    For a description of the object types, see the CL concepts and reference topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.

  2. In these file systems, libraries and database files cannot be deleted using the Remove Link (RMVLNK or alias DEL or ERASE) command. However, these objects can be deleted using the Remove Directory (RMVDIR or alias RMDIR or RD) command.

  3. The following object types cannot be deleted using another command: *EXITRG, *IGCSRT, *JOBSCD, *PRDAVL, *QRYDFN, *RCT.

QDLS File System Differences

  1. If this command is to be used to remove links for an object that is in this file system, additional restrictions may apply. To identify these restrictions, see the description of the Delete Document Library Object (DLTDLO) command.

Top


 

Parameters

Keyword Description Choices Notes
OBJLNK Object link Path name Required, Positional 1

Top

 

Object link (OBJLNK)

Specifies the path name of the object to unlink. Multiple links can be removed with a name pattern.

The object path name can be either a simple name or a name that is qualified with the name of the directory in which the object is located. A pattern can be specified in the last part of the path name. An asterisk (*) matches any number of characters and a question mark (?) matches a single character. If the path name is qualified or contains a pattern, it must be enclosed in apostrophes.

For more information on specifying path names, refer to "Object naming rules" in the CL concepts and reference topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.

Top


 

Examples

Example 1: Removing an Object Link

 RMVLNK   OBJLNK('PAY')

This command removes a link named PAY.

Top


 

Error messages

*ESCAPE Messages

CPFA085

Home directory not found for user &1.

CPFA093

Name matching pattern not found.

CPFA09C

Not authorized to object. Object is &1.

CPFA0A1

An input or output error occurred.

CPFA0A7

Path name too long.

CPFA0A9

Object not found. Object is &1.

CPFA0AB

Operation failed for object. Object is &1.

CPFA0B1

Requested operation not allowed. Access problem.

CPFA0B2

No objects satisfy request.

CPFA0BD

&1 links removed. &2 links failed.

Top