System Administration Guide

File System Administration Commands

Most file system administration commands have a generic and a file system-specific component. Use the generic commands, which call the file system-specific component. Table 26-1 lists the generic file system administrative commands, which are located in the /usr/sbin directory.

Table 26-1 Generic File System Administrative Commands

Command 

Description 

clri(1M)

Clears inodes 

df(1M)

Reports the number of free disk blocks and files 

ff(1M)

Lists file names and statistics for a file system 

fsck(1M)

Checks the integrity of a file system and repairs any damage found 

fsdb(1M)

Debugs the file system 

fstyp(1M)

Determines the file system type 

labelit(1M)

Lists or provides labels for file systems when copied to tape (for use by the volcopy command only)

mkfs(1M)

Makes a new file system 

mount(1M)

Mounts file systems and remote resources 

mountall(1M)

Mounts all file systems specified in a file system table 

ncheck(1M)

Generates a list of path names with their i-numbers 

umount(1M)

Unmounts file systems and remote resources 

umountall(1M)

Unmounts all file systems specified in a file system table 

volcopy(1M)

Makes an image copy of a file system 

Most of these commands also have a file system-specific counterpart.


Note -

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


Syntax of Generic Commands

Most of these commands use this syntax:

command [-F type] [-V] [generic-options] [-o specific-options] [special|mount-point] [operands] 
Table 26-2 Options and Arguments to Generic Commands

Option/Argument 

Description 

-F type

The type of file system. If you do not use this option, the command looks for an entry which 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

An instruction to echo 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 executed.

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

The file system indentification. This 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 and for other commands it must be the block device. See "Understanding Disk Device Names" on page 287 for more information about disk device names. 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, it 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 manual page of the command (for example, mkfs_ufs(1M)) for a detailed description. 

How the File System Commands Determine the File System Type

The generic file system commands determine the file system type by following this sequence:

  1. From the -F option, if supplied.

  2. By matching a special device with an entry in /etc/vfstab (if special is supplied). For example, fsck first looks for a match against the fsck device field; if no match is found, it then checks against the special device field.

  3. By using the default specified in /etc/default/fs for local file systems and in /etc/dfs/fstypes for remote file systems.

Manual Pages for Generic and Specific Commands

Both the generic and specific commands have manual pages in the man Pages(1M): System Administration Commands. The specific manual page is a continuation of the generic manual page. To look at a specific manual page, append an underscore and the file system type abbreviation to the generic command name. For example, to see the specific manual page for mounting an HSFS file system, type man mount_hsfs(1M).