Mbr:master Boot Record Master boot recording (512byte bytes)
Bootloader:446byte
Mark Partition: 16byte mark a partition (total 64byte)
Indicates if the MBR is valid: 2byte Magic number
################################################
ln
ln [options] ... Target (second format)
-S,--symbolic create symbolic links instead of hard links
-V,--verbose lists the names of each file before linking
Hard Links
1. Only files can be created
2. Cannot cross file system
3. Creating a hard connection increases the number of times a file is linked
Soft links
1. Can be applied to the directory
2. Can cross file system
3. Does not increase the number of times the file is linked
4. Its size is the number of characters that the specified path contains
[Email protected] ~]# LN-SV./test.sh/tmp/123.sh
"/tmp/123.sh", "./test.sh"
################################################
DF: Displaying file system Information
Usage: DF [options] ... [File] ...
Displays information about the file system where each file resides, by default displaying all file systems.
The long option must use parameters that are also required for short options.
-A,--all include dummy file systems
-B,--block-size=size use size-byte blocks
--direct Show statistics for a file instead of Mount point
--total produce a grand total
-H,--human-readable print sizes in human readable format (e.g., 1K 234M 2G)
-H,--si likewise, but use powers of 1024
-I,--inodes displays inode information instead of block usage
-K is--block-size=1k
-L,--local only displays the native file system
--no-sync do not synchronize before obtaining usage data (default)
-P,--portability using POSIX-compatible output formats
--sync synchronous action before obtaining usage data
-T,--type= type only displays information for the specified file system for the specified type
-T,--print-type display file system type
-X,--exclude-type= type only shows file system not specified type information
-V (Ignore)
--HELP Display this help message and exit
--version display version information and exit
################################################
Device files:
B: Devices that are randomly accessed (hard disks) in blocks
C: In characters, linear device (keyboard)
/dev
Main device number (major numbers)
Marking device Type
Secondary device number (minor numbers)
Mark different devices in the same type
The file name of the hardware device
IDE ATA:HD
Sata:sd
Scsi:sd
Usb:sd
################################################
Mknod
################################################
Fdisk
See how many hard drives are identified by the current system
[Email protected] ~]# fdisk-l
disk/dev/sda:85.9 GB, 85899345920 bytes
255 heads, Sectors/track, 10443 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk IDENTIFIER:0X00052FBA
Device Boot Start End Blocks Id System
/DEV/SDA1 * 1 204800 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 2637 20971520 Linux
/dev/sda3 2637 5248 20971520-up Linux
/DEV/SDA4 5248 10444 41737216 5 Extended
/dev/sda5 5248 7859 20971520-up Linux
/dev/sda6 7859 7892 262144, Linux Swap/solaris
Disk Management partitions
Fdisk/dev/sda
P: Displays the partition of the current hardware, including unsaved changes
N: Create a new partition
E: Extended partition
P: Primary partition
D: Delete a partition
W: Save exit
Q: Do not save exit
T: Modify the partition type
L
L: Show all supported types
[Email protected] ~]# cat/proc/partitions
Major Minor #blocks name
8 0 83886080 SDA
8 1 204800 sda1
8 2 20971520 Sda2
8 3 20971520 Sda3
8 4 1 SDA4
8 5 20971520 Sda5
8 6 262144 Sda6
Partprobe
This article is from the "James Zhan Linux Advanced ops" blog, so be sure to keep this source http://jameszhan.blog.51cto.com/10980469/1877870
Linux Essentials-22, hard disk-related commands ln DF Mknod fdisk