Most file system administration commands have a generic and a file system component. Use the generic commands, which call the file system component. Table 9-4 lists the generic file-system administrative commands, which are located in the /usr/bin directory.
Table 9-4 Generic File-System Administrative Commands
Command |
Description |
---|---|
Clears inodes |
|
Reports the number of free disk blocks and files |
|
Lists file names and statistics for a file system |
|
Checks the integrity of a file system and repairs any damage found |
|
File system debugger |
|
Determines the file-system type |
|
Lists or provides labels for file systems when copied to tape (for use by the volcopy command only) |
|
Makes a new file system |
|
Mounts file systems and remote resources |
|
Mounts all file systems specified in a file-system table |
|
Generates a list of path names with their i-numbers |
|
Unmounts file systems and remote resources |
|
Unmounts all file systems specified in a file-system table |
|
Most of these commands also have a file system counterpart.
Do not use the file system commands directly. If you specify an operation on a file system that does not support it, the generic command displays this error message: command: Operation not applicable for FSType type.
Most of these commands use this syntax:
command [-F type] [-V] [generic-options] [-o specific-options] [special|mount-point] [operands]
The options and arguments to the generic commands are:
-F type
Specifies the type of file system. If you do not use this option, the command looks for an entry that matches special or mount point in the /etc/vfstab file. Otherwise, the default is taken from the file /etc/default/fs for local file systems and from the file /etc/dfs/fstypes for remote file systems.
-V
Echoes the completed command line. The echoed line may include additional information derived from /etc/vfstab. Use this option to verify and validate the command line. The command is not run.
generic-options
Options common to different types of file systems.
-o specific-options
A list of options specific to the type of file system. The list must have the following format: -o followed by a space, followed by a series of keyword [=value] pairs separated by commas with no intervening spaces.
special|mount-point
Identifies the file system. The name must be either the mount point or the special device file for the slice holding the file system. For some commands, the special file must be the raw (character) device; for other commands it must be the block device. In some cases, this argument is used as a key to search the file /etc/vfstab for a matching entry from which to obtain other information. In most cases, this argument is required and must come immediately after specific-options. However, the argument is not required when you want a command to act on all the file systems (optionally limited by type) listed in the /etc/vfstab file.
operands
Arguments specific to a type of file system. See the specific man page of the command (for example, mkfs_ufs(4) for a detailed description.
The default remote file system type is /etc/dfs/fstype. The default local file system type is /etc/default/fs. See the default_fs(4) man page for more information.
In previous SunOS releases, all file system commands were located in the /etc directory. In the SunOS release 5.6 software, file system commands are organized into separate hierarchies for convenience. All of the file system commands are included in /usr/lib/fs/fstype. Commands needed before /usr is mounted are duplicated in /etc/fs/fstype.
The generic commands are located in /usr/sbin. The commands needed before /usr is mounted are duplicated in /sbin.
Table 9-5 lists the locations of the file-system commands.
Table 9-5 Locations of File System Commands
Type |
Location of Primary Version |
Location of Duplicate Version (root) |
---|---|---|
Generic |
/usr/sbin |
/sbin |
Specific |
/usr/lib/fs |