Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Reading floppy and cdrom in linux?

Posted on 1998-12-15
2
Medium Priority
?
355 Views
Last Modified: 2013-12-15
I have Red Hat 4.2 installed on my machine.  How do I access the floppy drive and the cdrom to read files and save files. What are the command line commands.  I have to big Unix and Linux books and neither of them tell me how to do such a simple thing as accessing the floppy drive or the cdrom drive.  Thanks for your help.
fugitive_2
0
Comment
Question by:fugitive_2
2 Comments
 
LVL 7

Accepted Solution

by:
jconde earned 60 total points
ID: 1631924
usually redhat creates the following directories:

/mnt/cdrom
/mnt/floppy

The floppy disk, cdrom, and all other storage devices work as if they where directories.

for example
if you want to copy /etc/passwd to the floppy drive all you do is
cp /etc/passwd /mnt/floppy

if you want to see the contents of a cd what you do is:
ls -laF /mnt/cdrom

if by any chance that fails, you will need to mount devices.
to mount the devices do the following
mount /dev/fd0 /mnt/floppy      //For the floppy
mount /dev/scd0 /mnt/cdrom   //CD-ROM

NOTE:

in the last case /mnt/floppy and /mnt/cdrom are simple directories....if you don't have them created you can create them or mount your device to any other directory.

i.e.
mount /dev/fd0 /my/floppy/directory.


bye

Jorge


0
 
LVL 1

Expert Comment

by:talwyn
ID: 1631925
ok  ,

    Here goes... Unix uses a single filesystem.  That is You don't have multiple Disks accessesed seperately like in Win/dos (A: C: D:) etc.  

 The process you need to follow is called mounting a file system.
the command relevant to this is 'mount'  for example :

$ mount /dev/fd0 /flop -tmsdos

  Will  mount the floppy disk in a directory called mount.

 similarly

$ mount /dev/cdrom  /mnt -tiso9660

 will mount a cdrom on a directory named mnt.

Generally mount can only be executed by root.  You can read the details in the man page.  This can be gotten around by changing permission of the mount program (this may be a security concern) or using sudo or other software allowing this sort of access.

Once mounted you can copy files to or from the device (assuming it is set with proper access rights ... see man page on fstab)

 Once you are done with a particular cd or floppy you can unmount the directory with:
   $ umount /flop
or $ umount /mnt

You cannot umount if the device is in use (i.e. you are in the directory representing the device) and again this command is generally only available to the root user.

 As a backup device you can access the floppy directly and read and write raw disk images by using the cp command.

  cp afile.txt /dev/fd0
copies an image of afile.txt onto the disk.
this method can only write a single file to a disk or copy a single file back from the disk.

for this reason the tar , and the cpio commands are used to archive multiple files.

--Talwyn

   


0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month7 days, 15 hours left to enroll

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question