rmnfsexp Command

Purpose

Unexports a directory from NFS clients.

Syntax

/usr/sbin/rmnfsexp -d Directory [ -V Exported Version ] [ -f Exports_file ] [ -I | -B | -N ] [ -F ]

Description

The rmnfsexp command removes an entry from the exports list for NFS clients. This command starts the exportfs command to unexport the specified directory. If an entry exists in the /etc/exports file, that entry is removed.

Flags

Item Description
-d Directory Specifies the directory to be unexported.
-f Exports_File Specifies the full path name of the exports file to use if other than the /etc/exports file.
-I Directs the command to remove the entry from the /etc/exports file without executing the exportfs command.
-B Removes the entry in the /etc/exports file for the directory specified, and executes the exportfs command to remove the export.
-N Unexports the directory immediately by invoking the exportfs command. The /etc/exports file is not modified with this flag.
-V Exported Version Specifies the version to be used for unexporting the directory. The valid version numbers are 2, 3 and 4.
-F Forces to unexport the directory.

Examples

  1. To unexport a directory immediately, enter the following command:
    rmnfsexp -d /usr -N
    In this example, the /usr directory is unexported immediately.
  2. To unexport a directory immediately and after every system restart, enter the following command:
    rmnfsexp -d /home/guest -B
  3. To unexport a directory immediately from an exports file other than the /etc/exports file, enter the following command:
    rmnfsexp -d /usr -f /etc/exports.other -N
  4. To unexport the /common/documents directory that is exported as version 3, enter the following command:
    rmnfsexp -d /common/documents -V 3

Files

Item Description
/etc/xtab Lists the currently exported directories.
html