Operating System - HP-UX
1820879 Members
3589 Online
109628 Solutions
New Discussion юеВ

Extremely Stupid Question from an Extremely Stupid Newbie

 
Aaron Misseri
New Member

Extremely Stupid Question from an Extremely Stupid Newbie

I have been thrust into a role of helping people with HP UX without knowing anything about Unix in general. My most immediate issue is that I can not figure out how to save a file to a floppy disk. I have tried everything I can think of. Any help?
Windows 2000 looks like ME but isNT
6 REPLIES 6
Maureen Gunkel
Trusted Contributor

Re: Extremely Stupid Question from an Extremely Stupid Newbie

Aaron,
First, you need to know the device name for the floppy drive attached to your system. Then you can cpio or tar the file to the floppy disk. Alternatively, you can FTP the file to a windows desktop and save it to that floppy drive. It all depends on what you are trying to do with the file after you send it to the floppy. Reply back to let me know what you're trying to accomplish.
Mo
No matter where you go, there you are.
Patrick Wallek
Honored Contributor

Re: Extremely Stupid Question from an Extremely Stupid Newbie

You can also use the command 'doscp' to copy the file to a floppy that can then, theoretically, be read by your PC. You can also go the other way and read a file off a floppy created by your PC and copy it to a directory on your HP-UX machine.

Do a 'man doscp' for more info. Here are some basics though.

Assume your floppy drive is /dev/rdsk/c1t1d0 - You can find this out for sure by using the command 'ioscan -fknC disk' to look at all disk devices on your system.

To copy file 123 in the /tmp directory on you HP-UX machine to the floppy drive do:

doscp /tmp/123 /dev/rdsk/c1t1d0:/123

If you want the file in a directory called tmp on the floppy then this should work:

doscp /tmp/123 /dev/rdsk/c1t1d0:/tmp/123

To copy file 456 from the floppy to the /tmp directory on your HP-UX machine:

doscp /dev/rdsk/c1t1d0:/456 /tmp/456

I hope this helps clear somethings up for you and doesn't just confuse you more.
Aaron Misseri
New Member

Re: Extremely Stupid Question from an Extremely Stupid Newbie

Both of you have been helpful but let me explain what I have done and what has happened.

I have found the FDC called c0t1d0, but I could not find it the way that Patrick suggested. I had to find it through the SAM. If I try to scan for the device using 'ioscan -fknC disk' my CD-ROM and HDD are listed but not the FDC.

This is just a guess and you can correct me if I am wrong, but does a User have to have the correct permission to use the Floppy Drive? Perhaps this is why I can not find doing the ioscan?

Also I tried both the cp and doscp command to try to copy the file I wanted to the floppy. Here is what I typed:

(dos)cp /tmp/123 /dev/rdsk/c0t1d0:/123

What comes up is a message saying "unable to create directory". Does this make send to either of you?
Windows 2000 looks like ME but isNT
Rita C Workman
Honored Contributor

Re: Extremely Stupid Question from an Extremely Stupid Newbie

Nothing stupid about the question...the wonderful thing about UNIX..one task and a dozen ways you could do it. Here's a couple:
1. You could simply FTP to your UNIX box from a PC and get the file.
2. You can copy it down to a floppy (as was stated).
To ioscan and identify the device name:
ioscan -fnC floppy
Then you would need to use the diskinfo command on the character device file to determine the kind of floppy disk you have.
NOW...you know the device file..so now you need to initialize (on a PC-it's formatting) the diskette. To do this use the mediainit command. Check man page for details -
Example for an HP 9122 3.5 diskette:
mediainit -i 2 -f 3 /dev/rdsk/9122
Now don't forget to mount a floopy file system and then just do a simple cp command to that file system.
Simple....hope I didn't leave anything out.
...Or if you're like me...that FTP looks pretty quick and simple now.

Just a thought,
Patrick Wallek
Honored Contributor

Re: Extremely Stupid Question from an Extremely Stupid Newbie

I could see why the regular unix 'cp' would not work with that command construct. I think it would get confused with the file name it is copying it to.

According the man page for doscp, that command should work. One question I have, Is the floppy disk formatted? Can you do things to the disk on a PC?

Another thing I noticed in the man page for doscp is that it says the 'sflop' driver must be configured in the kernel in order for these to work. It also says you can verify this with ioscan.

Try these ioscan commands and see if you can see your floppy drive:

ioscan -fnk

or

ioscan -fn

The driver that the floppy drive is using should be in the 4th column of the ioscan output. For your CDROM you should see something like sdisk in that column. If you do not see 'sflop' in that column for your floppy drive, then that may be part of the problem.

Try this and let us know.
Dan Hetzel
Honored Contributor

Re: Extremely Stupid Question from an Extremely Stupid Newbie

Hi Aaron,

No question is stupid, answers sometimes are...

As you're a newbie, I'd like to make one suggestion: try to give your post a meaningful subject line like "How to copy a file to/from a floppy ?", or something equivalent.
And, of course, welcome to a new member !!

Regarding your question, nearly eveything has been said before. Make sure that your kernel has the 'sflop' driver associated with your floppy device.
Check with:
ioscan -fnC floppy

It should show 'sflop' as the 4th item on the resulting line. If it doesn't, this could be the issue.

If the 'sflop' driver is in the kernel, make sure that the device file has read/write permission to world if you want everybody to be able to read/write from the floppy.

Best regards

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com