LinuxDevCenter.com
oreilly.comSafari Books Online.Conferences.





Linux in a Nutshell

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.

Buy it now, or read it online on Safari Bookshelf.



mkisofs

mkisofs [options] -o file pathspecs

Generate an ISO9660/Joliet/HFS filesystem for writing to a CD with a utility such as cdrecord. (HFS is the native Macintosh Hierarchical File System.) mkisofs takes a snapshot of a directory tree and generates a binary image that corresponds to an ISO9660 or HFS filesystem when it is written to a block device. Each specified pathspec describes the path of a directory tree to be copied into the ISO9660 filesystem; if multiple paths are specified, the files in all the paths are merged to form the image.

Options

-A id, -appid id

Specify a text string id that describes the application to be written into the volume header.

-abstract file

Specify the abstract filename. Overrides an ABST=file entry in .mkisofsrc.

-allow-lowercase

Allow ISO9660 filenames to be lowercase. Violates the ISO9660 standard.

-allow-multidot

Allow more than one dot in ISO9660 filenames. Violates the ISO9660 standard.

-b image

Specify the path and filename of the boot image to be used for making a bootable CD based on the El Torito specification.

-B sun-images

Specify a comma-separated list of boot images needed to make a bootable CD for a Sun Sparc system.

-biblio file

Specify bibliographic filename. Overrides a BIBLIO=file entry in .mkisofsrc.

-boot-info-table

Specify that a 56-byte table with information on the CD layout is to be patched in at offset 8 of the boot file. If specified, the table is patched into the source boot file, so make a copy if the file isn't recreatable.

-boot-load-seg addr

Specify the load segment address of the boot image for a no-emulation El Torito CD.

-boot-load-size size

Specify the number of virtual 512-byte sectors to load in no-emulation mode. The default is to load the entire boot file. The number may need to be a multiple of 4 to prevent problems with some BIOSes.

-c catalog

Specify the path, relative to the source pathspec, and the filename of the boot catalog for an El Torito bootable CD. Required for making a bootable CD.

-C last-start,next-start

Required for creating a CDExtra or a second or higher-level session for a multisession CD. last-start is the first sector number in the last session on the disk, and next-start is the first sector number for the new session. Use the command:

cdrecord -msinfo

to get the values. Use -C with -M to create an image that is a continuation of the previous session; without -M, create an image for a second session on a CDExtra (a multisession CD with audio data in the first session and an ISO9660 filesystem image in the second).

-[no-] cache-inodes

Cache [do not cache] inode and device numbers to find hard links to files. The default on Linux is to cache. Use -no-cache-inodes for filesystems that do not have unique inode numbers.

-check-oldnames

Check all filenames imported from old sessions for mkisofs compliance with ISO9660 file-naming rules. If not specified, check only those files with names longer than 31 characters.

-check-session file

Check all old sessions for mkisofs compliance with ISO9660 file-naming rules. This option is the equivalent of:

-M file -C 0,0 -check-oldnames

where file is the pathname or SCSI device specifier that would be specified with -M.

-copyright file

Specify the name of the file that contains the copyright information. Overrides a COPY=file entry in .mkisofsrc.

-d

Omit trailing period from files that do not have one. Violates the ISO9660 standard, but works on many systems.

-D

Do not use deep directory relocation. Violates the ISO9660 standard, but works on many systems.

-dir-mode mode

Specify the mode for directories used to create the image. Automatically enables the Rock Ridge extensions.

-eltorito-alt-boot

Start with a new set of El Torito boot parameters. Allows putting more than one El Torito boot image on a CD (maximum is 63).

-exclude-list file

Check filenames against the globs contained in the specified file and exclude any that match.

-f

Follow symbolic links when generating the filesystem.

-file-mode mode

Specify the mode for files used to create the image. Automatically enables the Rock Ridge extensions.

-force-rr

Do not use automatic Rock Ridge detection for the previous session.

-G image

Specify the path and filename of the generic boot image for making a generic bootable CD.

-gid gid

Set the group ID to gid for the source files. Automatically enables the Rock Ridge extensions.

-graft-points

Allow the use of graft points for filenames, which permits paths to be grafted at locations other than the root directory. -graft-points checks all filenames for graft points and divides the filename at the first unescaped equals sign (=).

-gui

Switch the behavior for a GUI. Currently, the only effect is to make the output more verbose.

-hard-disk-boot

Specify that the boot image to be used to create an El Torito bootable CD is a hard disk image and must begin with a master boot record containing a single partition.

-hidden glob

Set the hidden (existence) ISO9660 directory attribute for paths or filenames matching the shell-style pattern glob. To match a directory, the path must not end with a trailing /.

-hidden-list file

Specify a file containing a list of globs that are to be hidden with -hidden.

-hide glob

Find paths or files that match the shell-style pattern glob and hide them from being seen on the ISO9660 or Rock Ridge directory. The files are still included in the image file. If the pattern matches a directory, the contents of the directory are hidden. To match a directory, the path must not end with a trailing /. Use with the -hide-joliet option.

-hide-joliet glob

Hide paths or files that match the shell-style pattern glob so they will not be seen in the Joliet directory. If the pattern matches a directory, the contents of the directory are hidden. To match a directory, the path must not end with a trailing /. Should be used with -hide.

-hide-joliet-list file

Specify a file containing a list of globs to be hidden with -hide-joliet.

-hide-joliet-trans-tbl

Hide the TRANS.TBL files from the Joliet tree.

-hide-list file

Specify a file containing a list of globs to be hidden with -hide.

-hide-rr-moved

Rename the directory RR_MOVED to .rr_moved to hide it as much as possible from the Rock Ridge directory tree. Use the -D option to omit the file entirely.

-input-charset charset

Specify the character set for characters used in local filenames. Specify help in place of a charset for a list of valid character sets.

-iso-level level

Set the ISO9660 conformance level. Possible values are:

1

Filenames are restricted to 8.3 characters, and files may have only one section.

2

Files may have only one section.

3

No restrictions.

-J

Generate Joliet directory records in addition to regular ISO9660 filenames.

-jcharset charset

The equivalent of -input-charset -J.

-l

Allow full 31-character filenames instead of restricting them to the MS-DOS-compatible 8.3 format.

-L

Allow ISO9660 filenames to begin with a period.

-log-file file

Send all messages to the specified logfile.

-m glob

Exclude files matching the shell-style pattern glob.

-M path

Specify the path to an existing ISO9660 image to be merged. path can also be a SCSI device specified in the same syntax as cdrecord's dev= parameter. May be used only with -C.

-max-iso9660-filenames

Allow up to 37 characters in ISO9660 filenames. Forces -N. Violates the ISO9660 standard.

-N

Omit version numbers from ISO9660 filenames. Violates the ISO9660 standard. Use with caution.

-new-dir-mode mode

Specify the mode to use for new directories in the image. The default is 0555.

-nobak, -no-bak

Do not include backup files on the ISO9660 filesystem.

-no-boot

Mark the El Torito CD to be created as not bootable.

-no-emul-boot

Specify that the boot image for creating an El Torito bootable CD is a no-emulation image.

-no-iso-translate

Do not translate the # and ~ characters. Violates the ISO9660 standard.

-no-rr

Do not use Rock Ridge attributes from previous sessions.

-no-split-symlink-components

Do not split symlink components.

-no-split-symlink-fields

Do not split symlink fields.

-o file

Specify the filename of the output ISO9660 filesystem image.

-output-charset charset

Specify the output character set for Rock Ridge filenames. The default is the input character set.

-p prepid

Specify a text string of up to 128 characters describing the preparer of the CD. Overrides a PREP= parameter set in the file .mkisofsrc.

-P pubid

Specify a text string of up to 128 characters describing the publisher of the CD to be written to the volume header. Overrides a PUBL= parameter set in .mkisofsrc.

-[no -] pad

Pad [do not pad] the ISO9660 filesystem by 16 sectors (32 KB). If the resulting size is not a multiple of 16 sectors, add sectors until it is. The default is -pad.

-path-list file

Specify a file that contains a list of pathspec directories and filenames to add to the ISO9660 filesystem. Note that at least one pathspec must be given on the command line.

-print-size

Print estimated filesystem size and exit.

-quiet

Run in quiet mode; do not display progress output.

-r

Like -R, but set UID and GID to zero, set all file read bits to write, and turn off all file write bits. If any execute bit is set for a file, set all execute bits; if any search bit is set for a directory, set all search bits; if any special mode bits are set, clear them.

-R

Generate SUSP (System Use Sharing Protocol) and Rock Ridge records using the Rock Ridge protocol.

-relaxed-filenames

Allow ISO9660 filenames to include seven-digit ASCII characters except lowercase characters. Violates the ISO9660 standard.

-sort file

Sort file locations according to the rules in the specified file, which contains pairs of filenames and weights, with one space or tab between them. A higher weight puts the file closer to the beginning of the media.

-sysid id

Specify the system ID. Overrides a SYSI= parameter set in the file .mkisofsrc.

-T

Generate the file TRANS.TBL in each directory for establishing the correct filenames on non-Rock Ridge-capable systems.

-table-name table

Use table as the translation table name instead of TRANS.TBL. Implies -T. For a multisession image, the table name must be the same as the previous session.

-U

Allow untranslated filenames. Violates the ISO9660 standard. Forces the following options: -d, -l, -L, -n, -relaxed-filenames, -allow-lowercase, -allow-multidot, -no-iso-translate. Use with extreme caution.

-ucs-level num

Set the Unicode conformance level to the specified number, which can be between 1 and 3 (default is 3).

-use-fileversion

Use file version numbers from the filesystem. The version number is a string from 1 to 32767. The default is to set a version of 1.

-v

Run in verbose mode. Specify twice to run even more verbosely.

-V volid

Specify the volume ID (volume name or label) to be written to the master block. Overrides a VOLI= parameter specified in the file .mkisofsrc.

-volset id

Specify the volume set ID. Overrides a VOLS= parameter specified in .mkisofsrc.

-volset-seqno num

Set the volume set sequence number to num. Must be specified after -volset-size.

-volset-size num

Set the volume set size (the number of CDs in a set) to num. Must be specified before -volset-seqno.

-x path

Exclude path from being written to the CD, where path is the complete pathname derived from the concatenation of the pathname from the command line and the path relative to this directory. May be specified more than once to exclude multiple paths.

HFS options

-apple

Create an ISO9660 CD with Apple's extensions.

-auto file

Set file as the Autostart file to make the HFS CD use the QuickTime 2.0 Autostart feature. file must be the name of an application or document at the top level of the CD and must be less than 12 characters long.

-boot-hfs-file file

Install file as the driver file that may make the CD bootable on a Macintosh.

-cluster-size size

Specify the size in bytes of a cluster or allocation units of PC Exchange files.

-hfs

Create a hybrid ISO9660/HFS CD. Use with -map, -magic, and/or the various --HFS options (see manpage).

-hfs-bless folder

"Bless" the specified directory (folder), specified as the full pathname to mkisofs. This is usually the System Folder and is used in creating HFS bootable CDs. The pathname must be in quotes if it contains spaces.

-hfs-creator creator

Set the four-character default creator for all files.

-hfs-type type

Set the four-character default type for all files.

-hfs-unlock

Leave the HFS volume unlocked so other applications can modify it. The default is to lock the volume.

-hfs-volid id

Specify the volume name for the HFS partition. This name is assigned to the CD on a Macintosh and replaces the ID set with the -V option.

-hide-hfs glob

Hide files or directories matching the shell-style pattern glob from the HFS volume, although they still exist in the ISO9660 and/or Joliet directory. May be specified multiple times.

-hide-hfs-list file

The specified file contains a list of globs to be hidden.

-input-hfs-charset charset

Specify the input character set used for HFS filenames when used with the -mac-name option. The default is cp10000 (Mac Roman).

-mac-name

Use the HFS filename as the starting point for the ISO9660, Joliet, and Rock Ridge filenames.

-magic file

Use the specified magic file to set a file's creator and type information based on the file's magic number, which is usually the first few bytes of the file. The magic file contains entries consisting of four tab-separated columns specifying the byte offset, type, test, and a message.

-map file

Use the specified mapping file to set a file's creator and type information based on the filename extension. Only files that are not known Apple or Unix file types need to be mapped. The mapping file consists of five-column entries specifying the extension, file translation, creator, type, and a comment. Creator and type are both four-letter strings.

-no-desktop

Do not create empty Desktop files. The default is to create such files.

-output-hfs-charset charset

Specify the output character set used for HFS filenames. Defaults to the input character set.

-part

Generate an HFS partition table. The default is not to generate the table.

-probe

Search the contents of files for known Apple or Unix file types.

--format

Look for Macintosh files of the specified file format type. The valid formats are cap (Apple/Unix File System (AUFS) CAP files), netatalk, double, ethershare, ushare, exchange, sgi, xinet, macbin, single, dave, and sfm.