前两天去面试,做了一份试卷,就一道题没答出来,那张卷子的第一道题,“linux下怎么挂载软盘“
后面其它的写脚本什么的都搞定了,就这一个卡了,面试的时候那个对我说,你用linux那么久了,怎么挂载软盘怎么不答不出来呢?当时那叫一个汗呀。
俺用挂载过硬盘,光驱,磁带机,移动设备。说真的,还真从来没在linux下挂载过软盘。其实mount格式就是样的,主要是软盘的那个设备文件叫什么名字记不得了。
知耻后勇,现在补上吧:
1。Mounting Floppy Disks
Must be manually mounted and unmounted
mount /dev/fd0 /media/floppy
umount /media/floppy
2。Formattiong Floppy Disks
Two types of format needed to prepare a floppy:
Alow levelformat: fdformat /dev/df0H1440
A filesystem,one of
mkfs -t ext2 /dev/fd0
mke2fd /dev/fd0
mkfd -t vfat /dev/fd0
3。使用tar备份文件到未格式化的软盘
Floppeds can used like tape drives
low level format required
File system not needed
Floppy cannot be mounted
Use tar to write to the floppy
/dev/fd0 ks the destination
备份时按如下方法:
#unount /media/floppy (卸载)
#fdformat /dev/fd0H1440 (低格)
#tar cvfM /dev/fd0 file (其中"file"表示要备份的文件,M表示分片写入,当第一片写完后就会提示放入
第二片)
还原:
#tar xvfM /dev/fd0
如果有多片磁盘,在第一片还原完毕后会提示放入每二片。
后面其它的写脚本什么的都搞定了,就这一个卡了,面试的时候那个对我说,你用linux那么久了,怎么挂载软盘怎么不答不出来呢?当时那叫一个汗呀。
俺用挂载过硬盘,光驱,磁带机,移动设备。说真的,还真从来没在linux下挂载过软盘。其实mount格式就是样的,主要是软盘的那个设备文件叫什么名字记不得了。
知耻后勇,现在补上吧:
1。Mounting Floppy Disks
Must be manually mounted and unmounted
mount /dev/fd0 /media/floppy
umount /media/floppy
2。Formattiong Floppy Disks
Two types of format needed to prepare a floppy:
Alow levelformat: fdformat /dev/df0H1440
A filesystem,one of
mkfs -t ext2 /dev/fd0
mke2fd /dev/fd0
mkfd -t vfat /dev/fd0
3。使用tar备份文件到未格式化的软盘
Floppeds can used like tape drives
low level format required
File system not needed
Floppy cannot be mounted
Use tar to write to the floppy
/dev/fd0 ks the destination
备份时按如下方法:
#unount /media/floppy (卸载)
#fdformat /dev/fd0H1440 (低格)
#tar cvfM /dev/fd0 file (其中"file"表示要备份的文件,M表示分片写入,当第一片写完后就会提示放入
第二片)
还原:
#tar xvfM /dev/fd0
如果有多片磁盘,在第一片还原完毕后会提示放入每二片。