复制代码
#mkdir -p /mnt/usbhd1
#mkdir -p /mnt/usbhd2
说明:
建立目录用来作挂接点(mount point)
复制代码
#mount -t ntfs /dev/sdc1 /mnt/usbhd1
#mount -t vfat /dev/sdc5 /mnt/usbhd2
说明:
对ntfs格式的磁盘分区应使用-t ntfs 参数,对fat32格式的磁盘分区应使用-t vfat参数。
若汉字文件名显示为乱码或不显示,可以使用如下命令格式:
复制代码
#mount -t ntfs -o iocharset=cp936 /dev/sdc1 /mnt/usbhd1
#mount -t vfat -o iocharset=cp936 /dev/sdc5 /mnt/usbhd2
linux系统下使用fdisk分区命令和mkfs文件系统创建命令,可以将移动硬盘的分区制作成linux系统所特有的ext2、ext3格式。
这样,在linux下使用就方便多了。
使用如下命令直接挂接即可:
复制代码
#mount /dev/sdc1 /mnt/usbhd1
四,挂接U盘
和USB接口的移动硬盘一样对linux系统而言U盘也是当作SCSI设备对待的。
使用方法和移动硬盘完全一样。插入U盘之前,应先用fdisk –l 或 more /proc/partitions查看系统的硬盘和硬盘分区情况。
复制代码
[root at pldyrouter root]# fdisk -l
Disk /dev/sda: 73 dot 4 GB, 73407820800 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 4 32098+ de Dell Utility
/dev/sda2 * 5 2554 20482875 7 HPFS/NTFS
/dev/sda3 2555 7904 42973875 83 Linux
/dev/sda4 7905 8924 8193150 f Win95 Ext'd (LBA)
/dev/sda5 7905 8924 8193118+ 82 Linux swap
插入U盘后,再用fdisk –l 或 more /proc/partitions查看系统的硬盘和硬盘分区情况。
复制代码
[root at pldyrouter root]# fdisk -l
Disk /dev/sda: 73 dot 4 GB, 73407820800 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 4 32098+ de Dell Utility
/dev/sda2 * 5 2554 20482875 7 HPFS/NTFS
/dev/sda3 2555 7904 42973875 83 Linux
/dev/sda4 7905 8924 8193150 f Win95 Ext'd (LBA)
/dev/sda5 7905 8924 8193118+ 82 Linux swap
Disk /dev/sdd: 131 MB, 131072000 bytes
9 heads, 32 sectors/track, 888 cylinders
Units = cylinders of 288 * 512 = 147456 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 * 1 889 127983+ b Win95 FAT32
Partition 1 has different physical/logical endings:
phys=(1000, 8, 32) logical=(888, 7, 31)
系统多了一个SCSI硬盘/dev/sdd和一个磁盘分区/dev/sdd1。
/dev/sdd1就是我们要挂接的U盘,用如下命令挂载:
复制代码










