Linux Command Directory
This directory of Linux commands is from Linux in a Nutshell, 5th Edition.
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.
tune2fs [options] device
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.
Specify the maximum number of mount counts between two checks on the filesystem.
Specify the mount count. For use with -c to force a check the next time the system boots.
Specify the kernel's behavior when encountering errors. behavior must be one of:
Continue as usual.
Remount the offending filesystem in read-only mode.
Cause a kernel panic.
Force completion even if there are errors.
Allow group (a group ID or name) to use reserved blocks.
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.
Add an ext3 journal to the filesystem. If specified without -J, use the default journal parameters.
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:
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 -O jrnl-dev ext-jrnl
The size of the journal in megabytes. The size must be at least equivalent to 1024 blocks and not more than 102,400 blocks.
Display a list of the superblock's contents.
Specify the volume label of filesystem. The label must be no more than 16 characters.
Specify the percentage of blocks that will be reserved for use by privileged users.
Specify the filesystem's last-mounted directory.
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:
Enable Posix Acess Control Lists.
Assign new files the group-id of the directory in which they are created instead of the group-id of the process creating them.
Enable debugging code.
When journaling, commit all data to journal before writing to the filesystem.
When journaling, force data to the filesystem before committing metadata to the journal.
When journaling, force data to the filesystem after committing metadata to the journal.
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:
Use B-trees to speed up lookups on large directories.
Save file type information in directory entries.
Create an ext3 journal. Same as the -j option.
Save space on large filesystems by limiting the number of backup superblocks. Same as -s.
Specify the number of blocks that will be reserved for use by privileged users.
Turn the sparse superblock feature on or off. Run e2fsck after changing this feature.
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.
Allow user (a user ID or name) to use reserved blocks.
Set the UUID of the filesystem to a UUID generated by uuidgen or to one of the following:
Clear the existing UUID.
Randomly generate a new UUID.
Generate a new time-based UUID.