The following operations are performed under root
1.U Disk Mount
mkdir // Create a directory for mounting a USB flash drive // check the system mounted USB flash drive, if the system has a hard disk SDB1 on behalf of your USB flash drive,/DEV/SDB1 indicates that the machine has identified the USB flash drive, Mount // mount the USB stick/dev/sdb1 to the/mnt/usb directory // go to the USB stick directory to see the contents of the USB flash drive Umount Umount // uninstalling the USB drive
2. Mount the removable hard drive
We usually use the mobile hard disk is NTFS format, Linux is not supported by default NTFS partition, so need to install third-party plug-in ntfs-3g under Linux.
Installing NTFS-3G
Yum Install GCC // Install the compiler, always press Y, if you do not install GCC after compiling ntfs-3g will fail, GCC is a language lonux system programming compiler, mkdir // Create a folder ntfs3g for later compilation and installation ntfs-3g // Linux Default source code package storage location; Source package compile installation bit
Reset:/usr/local/software name
wgethttp//tuxera.com/opensource/ntfs-3g_ntfsprogs-2011.4.12.tgz//Download ntfs-3gTarZXVF ntfs-3g_ntfsprogs-2011.4. A. tgz//Unzip the NTFS-3G software compression packCD ntfs-3g_ntfsprogs-2011.4. A //Enter the folder you just unzipped, do not know the directory name can be used to view directory name./configure--prefix=/usr/local/ntf3g//compile, specify the installation directory/usr/local/ntf3g Make&& Make Install //Compiling the installation
CD//Return root directory
Rm-r-F ntfs-3g_ntfsprogs*//Delete all ntfs-3g_ntfsprogs-led all files are not reminded, "*" means matching all,-r recursive processing, all files and subdirectories under the specified directory are processed together,-F forces the deletion of files or directories.
Mount
// View mount information to see if the system recognizes the mobile hard disk,/DEV/SDA1 represents the first partition of the first hard disk,/DEV/SDB1 represents the first partition of the second hard disk,
disk/dev/sdb:160.0 GB, 160041885696 bytes
255 heads, Sectors/track, 19457 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x7ab8d700
Device Boot Start End Blocks Id System
/DEV/SDB1 * 1 5222 41945683+ 7 hpfs/ntfs
/DEV/SDB2 5223 10444 41945715 7 hpfs/ntfs
/DEV/SDB3 10445 15666 41945715 7 hpfs/ntfs
/DEV/SDB4 15667 19457 30451207+ 7 hpfs/ntfs
The above is a set of information about my drive
// Go to Catalog mkdir // Create 4 directories to mount each partition of the removable hard drive separately
Mount Command one:
Ntfs-3g/dev/sdb1/mnt/usb1-o Locale=ar_sa. utf-8// mount each partition to the corresponding directory, the latter part can also not add NTFS-3g/dev/sdb2/mnt/usb2-o Locale=ar_sa. utf-8NTFS-3g/dev/sdb3/mnt/usb3-o Locale=ar_sa. utf-8NTFS-3g/dev/sdb4/mnt/usb4-o Locale=ar_sa. utf-8 mount command two:mount ntfs-3g/dev/sdb1/mnt/usb1
LS//View the information in the mobile drive
Copy, back up files
CP // Copy all files from the Web directory to the/MNT/USB1 directory, that is, to the/DEV/SDB1 partition of the mounted removable hard disk Umount // uninstalling mounted removable hard drives
Automatically mount the removable hard drive on boot
----Edit/etc/fstab
CP // before editing, make a good backup of this habit. VI// Edit the file, add the following information at the end of the file, jump to the end of the file by G (shift+g)0000 0 0 0 0
: wq! Save exit, reboot will automatically mount the mobile drive