4.1 DF Command
Df,report file system disk space usage reports the usage of the FileSystem disks;
DF command format: DF [option]
Df-a:all displays disk usage for all file systems, including 0 blocks of file systems.
Df-h:human readable output file system sizes in an easy-to-understand format, such as 124KB, 345MB, 46GB.
Df-i:inodes Displays the I node usage.
DF-M: Display file system usage in MB;
Df-t:type Displays disk space usage for each of the specified types of file systems.
Df-x:exclude type lists disk space usage for a file system that is not a specified type.
Df-t:print type Displays the file system types.
DF in 512-byte units
The df–k is in 1024-byte units.
View memory usage, command for #free;
4.2 du command
Du, view file directory size, file size;
View directory or file size common commands for #du-sh/root;
-S refers to the table of contents;-h,human human visualization is easier to understand;
View all files or directories under the directory size, command for #du/root;
4.3/4.4 Disk Partitioning
Add a new disk to the virtual machine, operation see Figure;
right mouse button CenOS7, click Settings, and then pop up the dialog box, click Add, select Hard disk, the next default, add complete, OK, complete the new disk Add, new add disk, virtual machine does not display, need to restart the virtual machine;
List disk Partitions #fdisk-L ;
Partition the new hard disk, the command is #fdisk/dev/sdb;
Common options,
N,new new Partition;
P,print print out the columns;
W,write write save and exit;
Q,quit does not save the exit;
D,delete Delete partition;
What to do, enter the corresponding letter, for example: Create a new extended partition, command;
Explanation: Fdisk supports up to 2T disks, the primary partition is up to 4, the extended partition can be divided into logical partitions, the number of primary partitions + extended partitions <=4; logical partitions must be contiguous, the primary and logical partitions can be formatted, the extended partition cannot be directly formatted, the extended partition is just a shell, Contains 1 or more logical partitions;
Linux Study notes third week fourth class (February 8)