国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 服務器 > Linux服務器 > 正文

Linux系統(tǒng)下如何掛載FAT32的U盤

2024-09-05 23:02:02
字體:
供稿:網(wǎng)友

Linux掛載U盤步驟如下

1:將U盤插入USB接口,檢查是否插好

2:用fdisk命令檢查分區(qū)和USB設(shè)備信息

[root@wgods ~]# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 121601 976655610 8e Linux LVM

Disk /dev/sdb: 4012 MB, 4012900352 bytes
223 heads, 55 sectors/track, 639 cylinders
Units = cylinders of 12265 * 512 = 6279680 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 56 640 3580928 c W95 FAT32 (LBA)
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(42, 17, 40) logical=(55, 23, 1)
Partition 1 has different physical/logical endings:
phys=(487, 222, 55) logical=(639, 6, 31)

通過上面信息我們可以看出USB設(shè)備是FAT32格式的,標識為/dev/sdb1

[root@wgods ~]# fdisk -l | grep FAT32
/dev/sdb1 * 56 640 3580928 c W95 FAT32 (LBA)

3:在mnt目錄下先建立一個usb的目錄

[root@wgods ~]# cd /mnt/
[root@wgods mnt]# mkdir usb

4:掛載U盤
[root@wgods mnt]# mount -t vfat /dev/sdb1 /mnt/usb

掛載成功后,我們可以在/mount/usb下看到相關(guān)的內(nèi)容。

5:卸載U盤

執(zhí)行umount命令卸載U盤時,報如下錯誤“device is busy”,可以用參數(shù)l解決問題。當然你也可以用fuser命令解決問題。如下所示


[root@wgods ~]# umount /mnt/usb
umount: /mnt/usb: device is busy
umount: /mnt/usb: device is busy

[root@wgods ~]# umount -f /mnt/usb
umount2: Device or resource busy
umount: /mnt/usb: device is busy
umount2: Device or resource busy
umount: /mnt/usb: device is busy


[root@wgods ~]# umount -l /mnt/usb

問題解決

---------------------------------------------------------------------------------

[root@wgods usb]# umount /mnt/usb
umount: /mnt/usb: device is busy
umount: /mnt/usb: device is busy
[root@wgods usb]# fuser -m /mnt/usb
/mnt/usb: 21123c 21158c 21180c 21182c 21223c
[root@wgods usb]# ps -auxw | grep 21123
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
root 21123 0.0 0.0 3784 672 pts/2 T 15:10 0:00 more 12.sql
root 21346 0.0 0.0 3920 696 pts/2 S+ 15:52 0:00 grep 21123

[root@wgods usb]# fuser -kvm /mnt/usb

USER PID ACCESS COMMAND
/mnt/usb: root 21123 f.c.. more
root 21158 ..c.. man
root 21180 ..c.. sh
root 21182 ..c.. less
root 21223 ..c.. bash

[etl@wgods ~]$ umount /mnt/usb
umount: /mnt/usb is not in the fstab (and you are not root)
[etl@wgods ~]$ su - root
Password:
[root@wgods ~]# umount /mnt/usb


6: 刪除usb目錄
[root@wgods ~]# umount -l /mnt/usb
[root@wgods ~]# rm -rf /mnt/usb

注意:有時候掛載時,中文的文件名和目錄名會出現(xiàn)亂碼,為了避免這種情況可以指定字符集,命令如下

[root@wgods ~]# mount -t vfat -o iocharset=utf8,codepage=uft8 /dev/sdb1 /mnt/usb

[root@wgods ~]# mount -t vfat -o iocharset=cp936,codepage=936 /dev/sdb1 /mnt/usb

注意:cp936是指簡體中文,cp950是指繁體中文。

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 新巴尔虎右旗| 屏边| 隆昌县| 兴仁县| 海伦市| 弋阳县| 新邵县| 监利县| 宜兰县| 吉水县| 内乡县| 镶黄旗| 绍兴市| 台东县| 康乐县| 邓州市| 武城县| 囊谦县| 疏勒县| 波密县| 磐安县| 呼伦贝尔市| 安远县| 德江县| 繁峙县| 三都| 旺苍县| 万盛区| 余庆县| 罗城| 新巴尔虎左旗| 宁城县| 上蔡县| 三穗县| 施秉县| 达日县| 莱州市| 阳信县| 北海市| 姜堰市| 江源县|