[Turn] linux difference in mnt, media and dev directory

1./mnt directory manually mount storage hardware;

2. / media directory for auto-mount hardware (load points are automatically created and deleted by the system)

3. / dev device driver is not stored, but rather as an external device file access interface. For example, our U-disk, insert linux system partition with fdisk -l to view the file is displayed as / dev / sda1. Then we can u disk mount under / mnt / usb0, mount / dev / sda1 / mnt / usb0 can be.

/ Dev is root /, but not the mount point. Why a device has been recognized under os / dev, why can not access, and the need to mount? To answer this, we need to know what types of files under linux. Other than ordinary files, directories, what else? The first is a symbolic link to the file l began. When there is a ll command, and b files beginning with the start of the output c, respectively, is a character block device file and the device file. There are relatively rare in the socket file s began. Since linux can identify these files, it also mount a yarn, direct access is not on the list, but the fact is the need to mount, mount it in the end what did? The reason is that a lot of data organization and linux device's file system is not the same. Can not directly read, you want to see the file directory, you have to follow a certain format to resolve equipment in the file. This is the mount doing things, which according to your specified format to read the data in the device. Linux is converted into its own file system, so as to parse and read the data.

from:https://www.cnblogs.com/KM-Y/p/differentfrom-dev-media-mnt.html

 

Guess you like

Origin www.cnblogs.com/xuan52rock/p/12591426.html