tommyland
12-03-2000, 02:53 PM
After making a bunch of different files in vi text editor, I would like to know how to take one named file and transfer it to a floppy disk, and if I had information on a floppy how would I transfer that information back to a file?? Keep in mind I am new to linux but having alot of fun with it ! I still do not know alot of the commands yet..
posterboy
12-03-2000, 05:05 PM
This isn't easy, as there are SO many ways this can work. Linux is a single-rooted file system. The floppy has no identity of it's own, really, it's just a "device". It has to be "mounted", somewhere, anywhere. The "usual" place is at /mnt/floppy, but it doesn't have to be. Let's assume nothing at all is in fstab about this. Let's further aaume we have a DOS formatted floppy disk. First, type mount, and look at the mounted devices. Then, Command: mount -t msdos /dev/fd0 /mnt/floppy
now, do another "mount". See? Now do an ls /mnt/floppy. to put a file on it, it's something like this: cp myfile /mnt/floppy and to pull it back, cp /mnt/floppy/myfile .
Note the period. You MUST take care to "umount" afterwards. Here: umount /mnt/floppy and watch the drive spin, as the buffers flush. Then you can take it out. IF this is listed in fstab, you can mount this way:
mount /mnt/floppy. To put an ext2 file system on a floppy, DON'T mount it, but do:
mke2fs /dev/fd0 and that's that. Then mount it with the -t (FS type) set for ext2 but same as above. HTH
Ray
------------------
ray@raymondjones.net
HTTP://www.raymondjones.net