Linux Disk Management is directly related to the performance of the whole system.
Linux Disk Management Common three commands for DF, du Fdisk
DF: List The overall disk usage of the file system
Du: Check Disk space usage
FDISK: For disk partitioning
Df
DF Command parameter function: Check the disk space consumption of the file system. You can use this command to get how much space the hard disk is taking up, how much space is left, etc.
Information.
DF [-ahikhtm] [directory or file name]
Options and Parameters:
-A: Lists all file systems, including system-specific/proc, etc.
-K: Displays each file system in Kbytes capacity:
-M: Display each file system in MBytes capacity
-H: GBytes MBytes Kbytes, which is easier to read, shows itself;
-H: Replace m=1024k with m=1000k;
-T: Displays the file system type, along with the filesystem name of the partition (for example, Ext3), also listed
-I: Do not use the hard disk capacity, but the number of inode to display
Example 1
List all the file systems in the system to
。。。。
Under Linux, if DF does not have any options, the default is to list all of the system's (non-special in-memory file systems and Swaps) in 1 kbytes capacity.
Example 2
Display capacity results in an easy-to-read capacity format
# df-h
The du linux du command also looks at the space used, but the Linux du command, unlike the DF command, is a view of the space used by the file and directory disks, or the DF command
There are some differences, here are the Linux du commands
Grammar:
Du [-ahskm] file or directory name
Options and Parameters:
-A: Lists all files and directory capacity, because the default is only the number of files under the directory.
-H: Displayed in a more readable capacity format (g/m);
-S: does not include the total in the word directory and the-s a bit different.
-K: List capacity display in Kbytes;
-M: List capacity display with MBytes;
Wildcard * represents each directory
Unlike DF, du is a command that actually searches the file system for all of the file data.
Fdisk
FDISK is a disk partition table manipulation tool for Linux.
Disk formatting
After the disk is divided, it is natural to format the file system, the format of the command is very simple, using the MKFS (make filesystem) command
Grammar:
MKFS [-T file System format] Appliance file name
Options and Parameters:
-T: can take file system format, such as Ext3 ext2 VFAT, etc.
Disk inspection
The fsck (file system check) is used to check and maintain inconsistent file systems.
If the system is out of power or a disk problem occurs, the fsck command can be used to check the file system.
Grammar:
fsck [-t file system] [-acay] Appliance Name
Options and Parameters:
-T: Given the form of a file system, this parameter does not need to be added if there is already a definition in/etc/fstab or if the kernel itself is supported
-S sequentially executes a ksck command to check
-A: Check all listed partitions (partition) in/ETC/FSTB
-C: Show complete Check progress
-D: Print out debug results for e2fsck
-P: Simultaneously with the-a condition, multiple fsck checks are performed together
-R: Omit/No check when there is a-a condition at the same time
-V: Verbose display mode
-A: Automatically fix if check is wrong
-R: If the check is wrong, the user answers whether the repair
The-y: option specifies to detect that each file is automatically entered Yes and can perform a # fsck-y full check fix when unsure of those that are not normal.
Disk mount and dismount
Linux disk mounts using the Monut command, uninstall using the Umount command.
Disk mount Syntax:
Mount [-t file system] [-L Labe name] [-o extra option] [-n] Appliance file name mount point
Options and Parameters:
-F: Forced uninstallation can be used in situations where a similar network file system (NFS) cannot be read:
-N: Dismount without upgrade/etc/mtab
Uninstalling/DEV/HDC6
[[Email protected] ~] # UMOUNT/DEV/HDC6
Linux Disk Management