Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.
System administration command. Tune the parameters of a Linux Second Extended Filesystem by adjusting various parameters. You must specify the device on which the filesystem resides; it must not be mounted read/write when you change its parameters.
Options
-cmax-mount-counts
Specify the maximum number of mount counts between two checks on the filesystem.
-Cmount-count
Specify the mount count. For use with -c to force a check the next time the system boots.
-ebehavior
Specify the kernel's behavior when encountering errors. behavior must be one of:
continue
Continue as usual.
remount-ro
Remount the offending filesystem in read-only mode.
panic
Cause a kernel panic.
-f
Force completion even if there are errors.
-ggroup
Allow group (a group ID or name) to use reserved blocks.
-iinterval[d|w|m]
Specify the maximum interval between filesystem checks. Units may be in days (d), weeks (w), or months (m). If interval is 0, checking will not be time-dependent.
-j
Add an ext3 journal to the filesystem. If specified without -J, use the default journal parameters.
-Jjrnl-options
Specify ext3 journal parameters as a comma-separated list of option=value pairs. The specified options override the default values. Only one size or device option can be specified for a filesystem. Possible options are:
device=ext-jrnl
Attach to the journal block device on ext-jrnl, which must exist and must have the same block size as the filesystem to be journaled. ext-jrnl can be specified by its device name, by the volume label (LABEL=label), or by the Universal Unique Identifier (UUID) stored in the journal's ext2 superblock (UUID=uuid; see uuidgen). Create the external journal with:
mke2fs -Ojrnl-devext-jrnl
size=jrnl-size
The size of the journal in megabytes. The size must be at least equivalent to 1024 blocks and not more than 102,400 blocks.
-l
Display a list of the superblock's contents.
-Llabel
Specify the volume label of filesystem. The label must be no more than 16 characters.
-mpercentage
Specify the percentage of blocks that will be reserved for use by privileged users.
-Mdir
Specify the filesystem's last-mounted directory.
-omount-options
Set or clear the specified default mount-options. Mount options specified in /etc/fstab or on the command line for mount will override these defaults. Specify multiple options as a comma-separated list. Prefixing an option with a caret (^) clears the option. No prefix or a plus sign (+) causes the option to be set. The following options can be cleared or set:
acl
Enable Posix Acess Control Lists.
bsdgroups
Assign new files the group-id of the directory in which they are created instead of the group-id of the process creating them.
debug
Enable debugging code.
journal_data
When journaling, commit all data to journal before writing to the filesystem.
journal_data_ordered
When journaling, force data to the filesystem before committing metadata to the journal.
journal_data_writeback
When journaling, force data to the filesystem after committing metadata to the journal.
-Ooption
Set or clear the specified filesystem options in the filesystem's superblock. Specify multiple options as a comma-separated list. Prefixing an option with a caret (^) clears the option. No prefix or a plus sign (+) causes the option to be set. Run e2fsck after changing filetype or sparse_super. The following options can be cleared or set:
dir_index
Use B-trees to speed up lookups on large directories.
filetype
Save file type information in directory entries.
has_journal
Create an ext3 journal. Same as the -j option.
sparse_super
Save space on large filesystems by limiting the number of backup superblocks. Same as -s.
-rnum
Specify the number of blocks that will be reserved for use by privileged users.
-s [0|1]
Turn the sparse superblock feature on or off. Run e2fsck after changing this feature.
-Ttime
Set the time e2fsck was last run. The time specification is international date format, with the time optional—i.e., YYYYMMDD[[HHMM] SS] . If time is specified as time-last-checked, the current time is used.
-uuser
Allow user (a user ID or name) to use reserved blocks.
-Uuuid
Set the UUID of the filesystem to a UUID generated by uuidgen or to one of the following: