Description Display disk utilization information for directories directories. If directories directories are omitted, the current working directory is searched. are omitted, the current working directory is searched.

Frequently used options -a Shows all files, not just directories.

-c Produces a grand total for all listed items.

-h Displays results in a human-readable format, including suffixes such as M M (megabytes) and (megabytes) and G G (gigabytes). (gigabytes).

-s Prints a summary for each of the directories directories specified, instead of totals for each subdirectory found recursively. specified, instead of totals for each subdirectory found recursively.



-S Excludes subdirectories from counts and totals, limiting totals to directories directories.

Example 1 Examine disk utilization in /etc/rc.d /etc/rc.d: #du/etc/rc.d 882/etc/rc.d/init.d 1/etc/rc.d/rc0.d 1/etc/rc.d/rc1.d 1/etc/rc.d/rc2.d 1/etc/rc.d/rc3.d 1/etc/rc.d/rc4.d 1/etc/rc.d/rc5.d 1/etc/rc.d/rc6.d 904/etc/rc.d Example 2 Display utilization by files in /etc /etc, including subdirectories beneath it: #du-s/etc 13002/etc Example 3 Display utilization by files in /etc /etc, but not in subdirectories beneath it: #du-Ss/etc 1732/etc Example 4 Show a summary of all subdirectories under /home /home, with human-readable output: #du-csh/home/*

42k/home/bsmith 1.5M/home/httpd 9.5M/home/jdean 42k/home/jdoe 12k/home/lost+found 1.0k/home/samba 11Mtotal This result shows that 11 MB of total disk s.p.a.ce is used.

Example 5 Show the same summary, but sort the results to display in order of largest to smallest disk utilization: #du-cs/home/*sort-nr 11386total 9772jdean 1517httpd 42jdoe 42bsmith 12lost+found 1samba This result shows that user jdean jdean is consuming the largest amount of s.p.a.ce. Note that the human-readable format does not sort in this way, since is consuming the largest amount of s.p.a.ce. Note that the human-readable format does not sort in this way, since sort sort is unaware of the human-readable size specifications. is unaware of the human-readable size specifications.

Name tune2fs Syntax tune2fs[options]device Description Modify tunable parameters on the ext2 ext2 or or ext3 ext3 filesystem on filesystem on device device.

Frequently used options -l device device List the tunable parameters on device device.

-c n n Set the maximum mount count to n n. When the filesystem has been mounted this many times, the kernel will warn that the filesystem has exceeded the maximum mount count when the filesystem is mounted, and e2fsck e2fsck will automatically check the filesystem. See the discussion of will automatically check the filesystem. See the discussion of e2fsck e2fsck in the next section, in the next section, Checking and Repairing Filesystems Checking and Repairing Filesystems.Setting this value to 0 0 tells the kernel and tells the kernel and e2fsck e2fsck to ignore the mount count. to ignore the mount count.

-i n n Set the maximum time between two filesystem checks to n n. If n n is a number or is followed by is a number or is followed by d d, the value is in days. A value followed by w w specifies weeks. A value followed by specifies weeks. A value followed by m m specifies months. specifies months.The time since the last filesystem check is compared to this value by the kernel and e2fsck -p e2fsck -p, much like the maximum mount count. A value of 0 0 disables this check. disables this check.

-L label label Sets the volume label of the filesystem to label label. The volume label can also be set with the e2label e2label command. command.

-j Adds an ext3 ext3 journal file to the filesystem and sets the journal file to the filesystem and sets the has_journal has_journal feature flag. feature flag.

-m n n Sets the reserved block percentage to n n. By default, ext2 ext2 filesystems reserve 5 percent of the total number of available blocks for the filesystems reserve 5 percent of the total number of available blocks for the root root user. This means that if a filesystem is more than 95 percent full, only user. This means that if a filesystem is more than 95 percent full, only root root can write to it. (It also means that can write to it. (It also means that df df will report the filesystem as 100 percent full when it is really only 95 percent full.) will report the filesystem as 100 percent full when it is really only 95 percent full.)On very large filesystems, or filesystems where only user data will be written, the reserved block percentage can be safely reduced to make more of the filesystem available for writing by regular users.

-r n n Sets the number of reserved blocks to n n. This is similar to the -m -m option, except it specifies a number instead of a percentage. option, except it specifies a number instead of a percentage.

Example 1 List the contents of the superblock on /dev/sda1 /dev/sda1: #tune2fs-l/dev/sda1 tune2fs1.41.4(27-Jan-2009) Filesystemvolumename:/boot Lastmountedon: FilesystemUUID:35f8a3e0-9257-4b71-913d-407bef4eeb90 Filesystemmagicnumber:0xEF53 Filesystemrevision#:1(dynamic) Filesystemfeatures:has_journalext_attrresize_inode dir_indexfiletypeneeds_recoveryspa.r.s.e_super Filesystemflags:signed_directory_hash Defaultmountoptions:user_xattracl Filesystemstate:clean Errorsbehavior:Continue FilesystemOStype:Linux Inodecount:50200 Blockcount:200780 Reservedblockcount:10039 Freeblocks:158854 Freeinodes:50152 Firstblock:1 Blocksize:1024 Fragmentsize:1024 ReservedGDTblocks:256 Blockspergroup:8192 Fragmentspergroup:8192 Inodespergroup:2008 Inodeblockspergroup:251 Filesystemcreated:MonDec1514:43:582008 Lastmounttime:FriJul2410:25:082009 Lastwritetime:FriJul2410:25:082009 Mountcount:23 Maximummountcount:20 Lastchecked:MonDec1514:43:582008 Checkinterval:31536000(12months,5days) Reservedblocksuid:0(userroot) Reservedblocksgid:0(grouproot) Firstinode:11 Inodesize:128 Journalinode:8 Defaultdirectoryhash:half_md4 DirectoryHashSeed:92b218b8-9e1f-4aab-b481-08bec3ea2946 Journalbackup:inodeblocks Example 2 Turn off the maximum mount count and check interval tests on /dev/sda1 /dev/sda1: #tune2fs-i0-c0/dev/sda1 tune2fs1.41.4(27-Jan-2009) Settingmaximalmountcountto-1 Settingintervalbetweenchecksto0seconds

Name xfs_info Syntax xfs_infodevice Description XFS is a filesystem type that was originally designed for use on the IRIX operating system. It has been ported to Linux and is a popular choice among Linux users for its large filesystem capacity and robust feature set. The xfs_info xfs_info program will print out information about the XFS part.i.tion. program will print out information about the XFS part.i.tion.

Examples Create an XFS filesystem on /dev/sdb1 /dev/sdb1: #mkfs.xfsq/dev/sdb1 Query the filesystem for information: #xfs_info/dev/sdb1 meta-data=/dev/sdb1isize=256agcount=4,agsize=490108blks =sectsz=512attr=2 data=bsize=4096blocks=1960432,imaxpct=25 =sunit=0swidth=0blks naming=version2bsize=4096ascii-ci=0 log=internalbsize=4096blocks=2560,version=2 =sectsz=512sunit=0blks,lazy-count=0 realtime=noneextsz=4096blocks=0,rtextents=0

Name fsck Syntax fsck[options][-ttype][fs-options]filesystems Description Check filesystems filesystems for errors and optionally correct them. By default, for errors and optionally correct them. By default, fsck fsck a.s.sumes the a.s.sumes the ext2 ext2 filesystem type and runs interactively, pausing to ask for permission before applying fixes. filesystem type and runs interactively, pausing to ask for permission before applying fixes.

Frequently used options for fsck -A Run checks on all filesystems specified in /etc/fstab /etc/fstab. This option is intended for use at boot time, before filesystems are mounted.

-N Don"t execute, but show what would be done.

-t type type Specify the type of filesystem to check; the default is ext2 ext2. The value of type type determines which filesystem-specific checker is called. determines which filesystem-specific checker is called.

Frequently used options for e2fsck -b superblock superblock Use an alternative copy of the superblock. In interactive mode, e2fsck e2fsck automatically uses alternative superblocks. Typically, you"ll try automatically uses alternative superblocks. Typically, you"ll try -b 8193 -b 8193 in noninteractive mode to restore a bad superblock. in noninteractive mode to restore a bad superblock.

-c Check for bad blocks.

-f Force a check, even if the filesystem looks clean.

-p Automatically repair the filesystem without prompting.

-y Answers "yes" to all interactive prompts, allowing e2fsck e2fsck to be used noninteractively. to be used noninteractively.

Example 1 Check the ext3 ext3 filesystem on filesystem on /dev/sda1 /dev/sda1, which is not mounted: #fsck/dev/sda1 fsck1.41.4(27-Jan-2009) e2fsck1.41.4(27-Jan-2009) /boot:clean,48/50200files,41926/200780blocks The part.i.tion was clean, so fsck fsck didn"t really check it. didn"t really check it.

Example 2 Force a check: #fsck-f/dev/sda1 fsck1.41.4(27-Jan-2009) e2fsck1.41.4(27-Jan-2009) Pa.s.s1:Checkinginodes,blocks,andsizes Pa.s.s2:Checkingdirectorystructure Pa.s.s3:Checkingdirectoryconnectivity Pa.s.s4:Checkingreferencecounts Pa.s.s5:Checkinggroupsummaryinformation /boot:48/50200files(22.9%non-contiguous),41926/200780blocks Example 3 Force another check, this time with verbose output: #fsck-fv/dev/sda1 fsck1.41.4(27-Jan-2009) e2fsck1.41.4(27-Jan-2009) Pa.s.s1:Checkinginodes,blocks,andsizes Pa.s.s2:Checkingdirectorystructure Pa.s.s3:Checkingdirectoryconnectivity Pa.s.s4:Checkingreferencecounts Pa.s.s5:Checkinggroupsummaryinformation

48inodesused(0.10%) 11non-contiguousfiles(22.9%) 0non-contiguousdirectories(0.0%) #ofinodeswithind/dind/tindblocks:22/12/0 41926blocksused(20.88%) 0badblocks 0largefiles

32regularfiles 6directories 0characterdevicefiles 0blockdevicefiles 0fifos 0links 1symboliclink(1fastsymboliclink) 0sockets -------- 39files Example 4 Allow fsck fsck to automatically perform all repairs on a damaged filesystem by specifying the to automatically perform all repairs on a damaged filesystem by specifying the -y -y option to run the command automatically: option to run the command automatically: #fsck-y/dev/sda1 fsck1.41.4(27-Jan-2009) e2fsck1.41.4(27-Jan-2009) Couldn"tfindext2superblock,tryingbackupblocks...

/dev/sda1wasnotcleanlyunmounted,checkforced.

Pa.s.s1:Checkinginodes,blocks,andsizes Pa.s.s2:Checkingdirectorystructure Pa.s.s3:Checkingdirectoryconnectivity Pa.s.s4:Checkingreferencecounts Pa.s.s5:Checkinggroupsummaryinformation Blockbitmapdifferences:+1+2+3+4 Fix?yes Inodebitmapdifferences:+1+2+3+4+5+6 Fix?yes /dev/sda1:*****FILESYSTEMWASMODIFIED*****

/dev/sda1:1011/34136files(0.1%non-contiguous),4360/136521blocks When Linux boots, the kernel performs a check of all filesystems in /etc/fstab /etc/fstab using the using the -A -A option to option to fsck fsck (unless the (unless the /etc/fstab /etc/fstab entry contains the entry contains the noauto noauto option). Any filesystems that were not cleanly unmounted are checked. If that check finds any significant errors, the system drops into single-user mode so you can run option). Any filesystems that were not cleanly unmounted are checked. If that check finds any significant errors, the system drops into single-user mode so you can run fsck fsck manually. Unfortunately, unless you have detailed knowledge of the inner workings of the filesystem, there"s little you can do other than to have manually. Unfortunately, unless you have detailed knowledge of the inner workings of the filesystem, there"s little you can do other than to have fsck fsck perform all of the repairs. As a result, it is common to use the perform all of the repairs. As a result, it is common to use the -y -y option and hope for the best. option and hope for the best.

In some cases, a filesystem may be beyond repair or may even trigger a bug in e2fsck e2fsck. In these (thankfully very very rare) situations, there are a few commands that can help an rare) situations, there are a few commands that can help an ext2 ext2 filesystem wizard debug the problem. These commands are filesystem wizard debug the problem. These commands are e2image, dumpe2fs e2image, dumpe2fs, and debugfs debugfs. For more information on these tools, read their appropriate manpages.

Name xfs_metadump Syntax xfs_metadump[options]device Description xfs_metadump is a debugging tool that copies the metadata from an XFS filesystem to a file. This is useful as a debugging tool when you suspect filesystem problems, or as a backup tool. Images created by is a debugging tool that copies the metadata from an XFS filesystem to a file. This is useful as a debugging tool when you suspect filesystem problems, or as a backup tool. Images created by xfs_metadump xfs_metadump can be restored to a filesystem using the command can be restored to a filesystem using the command xfs_mdrestore xfs_mdrestore.

Frequently used options -e Stops the dump on a read error. Normally, it will ignore read errors and copy all the metadata that is accessible.

-g Shows dump progress.

-w Prints warnings of inconsistent metadata to stderr stderr. Bad metadata is still copied.On the ExamFamiliarity with du, df du, df, and fsck fsck is important. Be sure you understand the differences between the commands and when each is used. is important. Be sure you understand the differences between the commands and when each is used.

Objective 3: Control Filesystem Mounting and Unmounting As discussed in Objective 1: Create Part.i.tions and Filesystems Objective 1: Create Part.i.tions and Filesystems, the Linux directory hierarchy is usually made up of multiple part.i.tions, each joined to the root filesystem. Filesystems on removable media, such as CD-ROMs, USB flash drives, and floppy disks, are joined in the same way, but usually on a temporary basis. Each of these separate filesystems is mounted mounted to the parent filesystem as a directory (or to the parent filesystem as a directory (or mount point mount point) in the unified hierarchy.

Directories intended as mount points usually don"t contain files or other directories. Instead, they"re just empty directories created solely to mount a filesystem. If a directory that already contains files is used as a mount point, its files are obscured and unavailable until the filesystem is unmounted. Typical mount points include the directories /usr /usr, /home /home, /var /var, and others.

Managing the Filesystem Table Since the Linux filesystem hierarchy is spread across separate part.i.tions and/or multiple drives, it is necessary to automatically mount those filesystems at boot time. In addition, removable media and filesystems on remote NFS servers may be used regularly with recurring mount properties. All of this information is recorded in the /etc/fstab /etc/fstab file. Filesystems defined in this file are checked and mounted when the system boots. Entries in this file are consulted for default information when users wish to mount removable media. file. Filesystems defined in this file are checked and mounted when the system boots. Entries in this file are consulted for default information when users wish to mount removable media.

The /etc/fstab /etc/fstab file (see file (see Example7-1 Example7-1) is plain text and consists of lines with six fields: Device This field specifies the device file of the part.i.tion holding the filesystem (for example, /dev/hda1 /dev/hda1). This may either be the device name (like /dev/hda1 /dev/hda1), the UUID of the device (like UUID=35f8a3e0-9257-4b71-913d-407bef4eeb90 UUID=35f8a3e0-9257-4b71-913d-407bef4eeb90), or the part.i.tion label (like LABEL=/boot LABEL=/boot).

Mount point This field specifies the directory on which the filesystem is to be mounted. For example, if /dev/hda1 /dev/hda1 contains the root filesystem, it is mounted at contains the root filesystem, it is mounted at / /. The root filesystem will contain additional directories intended as mount points for other filesystems. For example, /boot /boot may be an empty directory intended to mount the filesystem that contains kernel images and other information required at boot time. may be an empty directory intended to mount the filesystem that contains kernel images and other information required at boot time.

Filesystem type Next, the type of filesystem is specified. These may include ext2 ext2 filesystems, filesystems, swap swap, nfs nfs, iso9660 iso9660 (CD-ROM), and others. (CD-ROM), and others.

Mount options This field contains a comma-separated list of options. Some options are specific to particular filesystem types. Options are described later in this Objective.

Dump frequency The dump dump program, a standard Unix backup utility, will consult program, a standard Unix backup utility, will consult /etc/fstab /etc/fstab for information on how often to dump each filesystem. This field holds an integer, usually set to for information on how often to dump each filesystem. This field holds an integer, usually set to 1 1 for native Linux filesystems such as for native Linux filesystems such as ext2 ext2, and to 0 0 for others. for others.

Pa.s.s number for fsck This field is used by the fsck fsck utility when the utility when the -A -A option is specified, usually at boot time. It is a flag that may contain only the values option is specified, usually at boot time. It is a flag that may contain only the values 0 0, 1 1, or 2 2.

A 1 1 should be entered for the root filesystem and instructs should be entered for the root filesystem and instructs fsck fsck to check that filesystem first. to check that filesystem first.

A 2 2 instructs instructs fsck fsck to check corresponding filesystems after those with a to check corresponding filesystems after those with a 1 1.

A 0 0 instructs instructs fsck fsck not to check the filesystem. not to check the filesystem.

Example7-1.Sample /etc/fstab file /dev/sda1/ext2defaults11 /dev/sda5/bootext2defaults12 /dev/sda9/homeext2defaults12 /dev/sda6/rootext2defaults12 /dev/sda10/tmpext2defaults12 /dev/sda8/usrext2defaults12 /dev/sda7/varext2defaults12 /dev/sda11swapswapdefaults00 /dev/fd0/mnt/floppyext2noauto,users00 /dev/hdc/mnt/cdromiso9660noauto,ro,users00 /dev/hdd/mnt/zipvfatnoauto,users00 fs1:/share/fs1nfsdefaults00 The fstab fstab in in Example7-1 Example7-1 depicts a system with a single SCSI disk, depicts a system with a single SCSI disk, /dev/sda /dev/sda. The first part.i.tion, /dev/sda1 /dev/sda1, contains an ext2 ext2 root filesystem. Part.i.tion root filesystem. Part.i.tion /dev/sda11 /dev/sda11 is swap. Part.i.tions is swap. Part.i.tions /dev/sda5 /dev/sda5 through through /dev/sda10 /dev/sda10 contain contain ext2 ext2 filesystems for /boot, /home, filesystems for /boot, /home, /root /root, /tmp /tmp, /usr /usr, and /var /var, respectively. All of the local ext2 ext2 part.i.tions are to be checked by part.i.tions are to be checked by fsck fsck and dumped. Entries for the floppy disk ( and dumped. Entries for the floppy disk (/dev/fd0), CD-ROM (/dev/hdc), and IDE Zip drive (/dev/hdd) hold appropriate mount properties, making manual mounting of these devices simple. Finally, this example shows a remote NFS mount of directory /share /share of system of system fs1 fs1. It is mounted locally at /fs1 /fs1.

The /etc/fstab /etc/fstab file is automatically created when Linux is installed and is based on the part.i.tioning and mount point configuration specified. This file can be changed at any time to add devices and options, tailoring the filesystem to meet your specific needs. file is automatically created when Linux is installed and is based on the part.i.tioning and mount point configuration specified. This file can be changed at any time to add devices and options, tailoring the filesystem to meet your specific needs.

On the ExamYou should memorize the functions of each column in /etc/fstab /etc/fstab and be prepared to answer questions on each. and be prepared to answer questions on each.

Mounting Filesystems Filesystems are mounted using the mount mount command. At boot time, those filesystems with a nonzero pa.s.s number in command. At boot time, those filesystems with a nonzero pa.s.s number in /etc/fstab /etc/fstab are checked and automatically mounted. Later, you can run are checked and automatically mounted. Later, you can run mount mount manually to add other filesystems to the filesystem hierarchy. manually to add other filesystems to the filesystem hierarchy.

Unmounting Filesystems Filesystems can be unmounted using the umount umount command. When a filesystem is unmounted, the buffers of the filesystem are synchronized with the actual contents on disk and the filesystem is made unavailable, freeing the mount point. If the filesystem is busy, command. When a filesystem is unmounted, the buffers of the filesystem are synchronized with the actual contents on disk and the filesystem is made unavailable, freeing the mount point. If the filesystem is busy, umount umount yields an error. This will happen, for example, when the filesystem contains open files or when a process has a working directory within the filesystem. Other less obvious errors can occur when removable media are exchanged without being unmounted first. yields an error. This will happen, for example, when the filesystem contains open files or when a process has a working directory within the filesystem. Other less obvious errors can occur when removable media are exchanged without being unmounted first.

Name mount Syntax mount[options]device mount[options]directory mount[options]devicedirectory Description Used to mount filesystems into the filesystem hierarchy. The first and second forms consult /etc/fstab /etc/fstab and mount the filesystem located on and mount the filesystem located on device device or intended to be attached to or intended to be attached to directory directory, respectively. In both cases, information necessary to complete the mount operation is taken from /etc/fstab /etc/fstab. The third form is independent of /etc/fstab /etc/fstab and mounts the filesystem on and mounts the filesystem on device device at mount point at mount point directory directory.

The mount mount command accepts two kinds of options: command accepts two kinds of options: command-line command-line and and mount mount. The command-line options provide general direction for the mount mount command. The mount options are used to specify additional information about the device being mounted. command. The mount options are used to specify additional information about the device being mounted.

Command-line options -a Mounts all of the part.i.tions specified in /etc/fstab /etc/fstab, except those with the noauto noauto option. option.

-h Displays help on the mount mount command. command.

-o mount_options mount_options Specifies mount options on the command line.

-r Mounts the filesystem as read-only.

-t fstype fstype Specifies that the filesystem to be mounted is of type fstype fstype. This option is typically used interactively when no entry for the mount exists in /etc/fstab /etc/fstab.

-v Sets verbose mode.

-w Mounts the filesystem in read/write mode.

Mount options A number of parameters are available as options for mounting filesystems. These options may be specified in /etc/fstab /etc/fstab or as arguments of the or as arguments of the -o -o command-line command-line mount mount argument. These options modify the way argument. These options modify the way mount mount configures the mounted filesystem. Some of the options can provide added security by controlling some operations on the filesystem. Others protect the filesystem from damage. Here is a partial list: configures the mounted filesystem. Some of the options can provide added security by controlling some operations on the filesystem. Others protect the filesystem from damage. Here is a partial list: async Establishes asynchronous I/O to the mounted filesystem. The opposite is sync sync.

auto Enables a mount specification in /etc/fstab /etc/fstab to be processed with the to be processed with the -a -a command-line option, as needed at boot time. The opposite is command-line option, as needed at boot time. The opposite is noauto noauto.

defaults Implies rw rw, suid suid, dev dev, exec exec, auto auto, nouser nouser, and async async. It is commonly found on /etc/fstab /etc/fstab entries for entries for ext2 ext2 and and ext3 ext3 mount points. mount points.

dev Interprets character or block special devices on the filesystem.

exec Enables the execution of programs contained on the mounted part.i.tion. The opposite is noexec noexec.

noauto Prohibits automatic mounting with the -a -a option. This is usually specified for removable media. option. This is usually specified for removable media.

noexec Prohibits the execution of executable programs, a potential security measure.

nosuid Disables the effect of suid or sgid bits on executable files.

nouser Forbids nonroot users from mounting and unmounting the filesystem. See user user and and users users for the opposite effect. for the opposite effect.

ro Equivalent to specifying the command-line option -r -r.

rw Equivalent to specifying the command-line option -w -w.

suid Enables the effect of suid and sgid bits on executable files.

sync Establishes synchronous I/O to the mounted filesystem. The opposite is async async.

user Allows an ordinary user to mount the filesystem but prohibits other ordinary users from unmounting it. This is useful for removable media that an individual requires control over. See also users users.

users Allows any user to mount and unmount the filesystem.

Note that the user user and and users users options make the options make the mount mount and and umount umount commands available to nonroot users. This may be important for some systems where end users must have the ability to mount removable media. commands available to nonroot users. This may be important for some systems where end users must have the ability to mount removable media.

The prevalence of removable media such as USB flash drives has caused the majority of Linux distributions to be configured by default to mount these devices automatically when they are plugged into a USB port. These devices are usually mounted under the directory /media /media and are given a directory name that matches the label name of the part.i.tion. For example, if the part.i.tion on my USB flash drive is labeled "USBDISK", it will be automatically mounted under the directory and are given a directory name that matches the label name of the part.i.tion. For example, if the part.i.tion on my USB flash drive is labeled "USBDISK", it will be automatically mounted under the directory /media/USBDISK /media/USBDISK when I plug it into a USB slot. Although the device is mounted automatically, there is no way to when I plug it into a USB slot. Although the device is mounted automatically, there is no way to unmount unmount it automatically, and you must be careful of potential data loss if you remove a device like this before Linux is done writing data to it. The it automatically, and you must be careful of potential data loss if you remove a device like this before Linux is done writing data to it. The umount umount command (described later in this chapter) is required in order to detach this device from the filesystem, flush all pending disk writes, and allow it to be safely removed. Most Linux distributions also have some sort of GUI tool to handle the unmounting of removable media. command (described later in this chapter) is required in order to detach this device from the filesystem, flush all pending disk writes, and allow it to be safely removed. Most Linux distributions also have some sort of GUI tool to handle the unmounting of removable media.

Filesystem types When mounting a filesystem, the filesystem type filesystem type should be specified either by using the should be specified either by using the -t -t option to option to mount mount or in the third field in or in the third field in /etc/fstab /etc/fstab. (If -t -t is omitted or is omitted or auto auto is specified, the kernel will attempt to probe for the filesystem type. This can be convenient for removable media, where the filesystem type may not always be the same or even known.) Linux can mount a variety of filesystems. The following are some of the more popular ones: is specified, the kernel will attempt to probe for the filesystem type. This can be convenient for removable media, where the filesystem type may not always be the same or even known.) Linux can mount a variety of filesystems. The following are some of the more popular ones: ext2 The standard Linux filesystem.

ext3 A journaling filesystem that is backward-compatible with ext2 ext2.

msdos The MS-DOS FAT filesystem, limited to "8.3" filenames (eight characters, a dot, and a three-character extension).

vfat Virtual FAT, used instead of msdos msdos when long filenames must be preserved. For example, you may wish to have access to Windows part.i.tions on systems configured to boot both Linux and Windows. when long filenames must be preserved. For example, you may wish to have access to Windows part.i.tions on systems configured to boot both Linux and Windows.

ntfs The native MS Windows part.i.tion since Windows 2000.

iso9660 The CD-ROM format.

nfs Remote servers.

swap Swap part.i.tions.

© 2024 www.topnovel.cc