HP-UX Reference (11i v2 03/08) - 1M System Administration Commands N-Z (vol 4)
r
rmsf(1M) rmsf(1M)
NAME
rmsf - remove a special (device) file
SYNOPSIS
/sbin/rmsf [-a-k][
-D directory ][-q-v] special_file ...
/sbin/rmsf [-C class -d
driver][-D directory ] -H hw_path [-k][-q
-v]
DESCRIPTION
The
rmsf command removes one or more special files from the
/dev directory and potentially removes
information about the associated device or devices with H/W type "DEVICE" (see ioscan (1M)) from the
system.
If no options are specified,
rmsf removes only the special_files specified on the command line. The -k
option causes rmsf to remove the definition of the device from the system without removing any special
files. The -a option causes rmsf
to remove the device definition, and all special files that map to it from
the
/dev directory (or the directory specified with the
-D option). By default, rmsf only removes
special_file as given on the command line, however, when the
-a option is used and special_file is an
absolute path name special_file will be removed even if it does not reside in the
/dev directory (or the
directory specified with the
-D
option). Note that if special_file belongs to a node for which H/W type is
not "DEVICE", the device definition will not be removed from the system and the special_file will be
removed if it is a leaf node.
If a
-H hw_path is specified, special files are removed as follows:
• If hw_path belongs to a node with H/W type "DEVICE," all special files mapping to devices at
that hardware path and the system definition of those devices are removed.
• If hw_path belongs to a node for which H/W type is not "DEVICE," then, a special file is removed
as follows:
• If it is a leaf node, only special files for that node will be removed.
• If the node has children, then a warning message will be issued and system definition of all
the children devices and their special files are removed.
The
-C and -d options remove only those special files that are associated with the given device driver or
that belong to the given device class, respectively. This is useful when there is more than one type of spe-
cial file mapped to a single hardware path.
If the
-k option is specified, the definition of all devices at that hardware path are removed from the sys-
tem, again without removing any special files.
Normally,
rmsf displays a message as the special files are deleted for each driver. The
-q (quiet) option
suppresses the deletion message. The
-v (verbose) option displays the deletion message and the name of
each special file as it is deleted.
Note that most drivers do not support the ability to be removed from the system.
If the device being removed from the system uses a dynamically assigned major number, that number will
be freed up for future allocation.
Options
rmsf recognizes the following options:
-a Remove the definition of the device from the system along with all special files that
refer to the device. This option cannot be used with -k.
-C class Match devices that belong to a given device class, class . Device classes can be listed
with the lsdev command (see lsdev(1M)). They are defined in files in the directory
/usr/conf/master.d. This option cannot be used with -d.
-d driver Match devices that are controlled by the specified device driver, driver.Device
drivers can be listed with the lsdev command (see lsdev(1M)). They are defined
in files in the directory /usr/conf/master.d. This option cannot be used with
-C.
-D directory Override the default device installation directory /dev and remove the special files
from directory instead. directory must exist; otherwise, rmsf displays an error
message and exits. See WARNINGS.
Section 1M−−686 Hewlett-Packard Company − 1 − HP-UX 11i Version 2: August 2003