1. Fdisk [-l] device name: Viewing disk partitioning, disk or partition, parameters:
-l: all the partition behind the content output connected devices. If only fdisk -l, then the system will be able to search the entire system partition within the device are listed.
After the instruction is executed, simply for help: Enter m after, to see the meaning of each parameter.
2. mkfs [-t file system format] means the file name: file system format, parameters:
1) -t: You can access the file format, such as ext3, ext2, vfat, etc.
3. mke2fs [-b block size] [- i block size] [-L header] [-cj] means: creating a file system command parameters,
1) -b: You can set the size of each block, and is currently supporting 1024,2048,4096bytes three kinds;
2) -i: How much capacity a given inode
3) -c check for disk errors, issued only once -c, it will be quickly read test, if issued twice -c -c, it will test the read and write, a bit slow
4) -L: behind you can access the header name.
5) -j: Originally mke2fs is EXT2, plus after -j, will take the initiative to join and become EXT3 journal
4. fsck [-t file system] [- ACay] device name: file system checking and correction, only root privileges to use this command parameter:
1) -t: the type of file system, ext3, and now linux automatically by analyzing the file system superblock, and therefore generally do not need this option
2) -A: scanning device based on the contents of / etc / fstab will need once the instruction is executed by the boot process
3) -a: Check to automatically fix the problem sectors,
4) -y: Similar -a, but only some filesystem support this parameter -y
5) -C: in the inspection process, the use of the histogram shows the current progress
In addition to ext2, ext3 file system is also available in:
6) -f: mandatory testing in general if not found any dirty mark, will not take the initiative to check into the details, if you want to be forced into detail check, coupled with the parameters can
7) -D: directory for the file system under optimization.
This directive must uninstall the device to perform, if the instruction executes on a mounted device, the system hung up
5. badblocks [-svw] Device Name: Check the hard disk or floppy disk sector there is no bad track command parameters:
1) -s: Lists progress on screen
2) -v: we can see the progress on screen
3) -w: The write way to test, generally do not recommend using this parameter, especially a device has to be examined when file.
6. mount [-al] [-t file system] [- L label name] [-o extra options] [-n] device filename mount point: mount the device to a specified directory, parameters:
1) -a: according to the configuration file / etc / fstab data will all unmounted disk mount up
2) -l: simply enter the mount shows the current mount information, plus additional Label name after -l can
3) -t: add the file system type specified To mount the type of species
4) -n: By default, the system will actually try to mount a write / etc / mtab, and to facilitate the operation of other programs, but in some cases (such as stand-alone mode) To avoid problems, Council can not write, then you have to use this option -n the
5) -L: In addition to using the system device file name (/ dev / hd6), you can also use the file system header name (Label) to mount. The best for your file system to take a unique name
6) -o: back can take some extra time to mount parameters plus! For example, account numbers, passwords, read and write permissions:
ro, rw: read-only or mount a file system called erasable
async, sync this file system whether to use synchronous or asynchronous writes memory mechanism, the default is asynchronous
auto, noauto: Allow this partition to mount automatically mount -a
dev, nodev: whether to allow on this partition can create files
suid, nosuid: whether to allow this partition contains a suid / sgid file format
exec, noexec: whether on this partition can have an executable binary file
user, nouser: whether to allow this partition to allow any user to perform mount, general mount only root can run, but issued a user parameter, you can let the average user can mount this partition be
defaults: default value: rw, suid, dev, exec, auto, nouser, async
Under normal circumstances, these parameters do not need to specify the system will automatically get according superblock
mount --bind source directory target directory: will mount a directory to another directory to the same inode nodes in its two directories.
7. umount [-fn] means the file name or mount point: unload device directory, parameters:
Under a forced dismount, can not be read in the network file system similar situation: 1) -f
2) -n: do not update at / etc / mtab / dismount situation
8. mknod device filename [bcp] [Major] [Minor]: option parameter:
1) b: setting means to be a file storage peripherals, such as hard disks, etc.
2) c: A name becomes a peripheral input device file, such as a mouse / keyboard
3) Setting the device name as a FIFO file.
9. e2label device name of the new Label name: change the name of the file system header
10. tune2fs [-jlL] means code: convert the file system type, parameters:
1) -l: dumpe2fs -h similar function, will read out the data within the superblock
2) -j: the performance of ext2 file system to ext3 file system
3) -L: e2label similar functions, you can modify the name of the file system's label
11. hdparm [-icdmXTt] Device Name: adjust the hard disk parameters, only the interface is IDE hard work, parameters:
1) -i: hard core detected parameters displayed
2) -c: set 32-bit access mode. This 32-bit access mode refers to a transmission between the hard disk and PCI interface mode, the hard drive itself is still stored in 16-bit mode.
3) -d: Sets whether dma mode, -d1 is enabled, -d0 is canceled
4) -m: set multiple sector mode synchronous read, in general, set this mode, the system can be reduced because disk reads and loss of performance, however, WD recommends setting the hard disk is not how this value generally, optimization is set to 16/32, however, W / D recommended value is 4/8. this is worth the maximum can use hdparm -I / dev / had MaxMultSect output is set, if you do not know in general set 16 is more reasonable.
5) -X: UtraDMA setting mode, in general, UDMA mode value plus the value of 64 is set, and the hard drive and motherboard chip must be synchronized, so that the minimum is, in general:
33 MHz DMA mode 0 ~ 2 (X64 ~ 66)
66 MHz DMA mode 3 ~ 4 (X67 ~ 68)
100 MHz DMA mode 5 (69)
UTA is above 100, then set the X69 is also good if your hard drive shown above.
-T: Test performance when accessing cache staging area
-t: test the actual disk access performance.