Link to home
Start Free TrialLog in
Avatar of Ned_Kelly
Ned_KellyFlag for Australia

asked on

Can copy floppy, but cant copy mounted cdrive

Hi folks, linux newbie here.
I have a dual boot with win98 and redhat 7.1
Just trying get around the system and mount various drives and devices, of which I can do ok. I can copy a vfat floppy ok but if I tried to copy the command.com after mounting as
mkdir /mnt/cdrive
mount -t vfat /dev/hda1 /mnt/cdrive
cd /mnt/cdrive
ls
I can then see the insides of my win drive
its when I try to copy the command.com it wont do it
cp /command /win
/win is a dir made before hand, that resides in the linux partition
It comes up and tells me that its not a dir, and if I tried to ./command.com it then tells me that it is a dir.
I have tried to chmod 777 command.com which it seems to accept, but I still can't copy it
I have tried various changes to the copy prompt, but to no avail.
The one that worked for me with the floppy was
cp * /floppy which copied all the files into the floppy dir  I don't want to copy all the files I want to be able to copy selected files at random.
Any help would be appreciated.
Regards Ned
ASKER CERTIFIED SOLUTION
Avatar of swapsthegreat
swapsthegreat

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
mcopy command.com /win
# even works without mounting floppy for FAT and VFAT floppies
Avatar of Ned_Kelly

ASKER

Hi folks, thanks for the comment, I got it to work just fine.
Just one more note, I was trying to copy a file from command.com without knowing its name, all I know is its starts with an s.
I typed this in and it wouldn't work.
cp /mnt/cdrive/command.com/s* /win
Any help would be greatly appreciated.

Thanks to ahoffmann for the mcopy
cp /mnt/cdrive/command.com/s\* /win
# or
cp '/mnt/cdrive/command.com/s*' /win
Hi folks, thanks for the comment, I got it to work just fine.
Just one more note, I was trying to copy a file from command.com without knowing its name, all I know is its starts with an s.
I typed this in and it wouldn't work.
cp /mnt/cdrive/command.com/s* /win
Any help would be greatly appreciated.

Thanks to ahoffmann for the mcopy
Hi ahoffmann, I tried the prompt but couldn't get it to work.  Tried it both ways and I get the error message that cp couldn't stat said line, then that it isn't a dir
Thanks for your help
Ned
Hi ahoffmann, I tried the prompt but couldn't get it to work.  Tried it both ways and I get the error message that cp couldn't stat said line, then that it isn't a dir
Thanks for your help
Ned
please post exactly what you have done, and what you get
Hi ahoffmann, I tried the prompt but couldn't get it to work.  Tried it both ways and I get the error message that cp couldn't stat said line, then that it isn't a dir
Thanks for your help
Ned
Hello ahoffmann, thanks again for your help.
This is my process so far.
mount -t vfat /dev/hda1 /mnt/cdrive
cd /mnt/cdrive
cp /mnt/cdrive/command.com/s\* /win
cp: cannot stat '/mnt/cdrive/command.com/s*' : Not a directory
I then changed it to read
cp '/mnt/cdrive/command.com/s*' /win
cp: cannot stat '/mnt/cdrive/command.com/s*' : Not a directory
It came up with the same message.
The messages are written as they appeared on the screen.
I have been able to copy the whole of command.com over to the /win dirbut I haven't been able to look in it.
Is there something that I have to do to enter command.com.
Many thanks for your help.
Ned
anything is ok. Where is you Problem?

/mnt/cdrive/command.com is a file on your floppy, so you can copy it using cp.

So /mnt/cdrive/command.com/s* cannot be a directory, and therfore cp complains.

Died you probably mean:
  cp /mnt/cdrive/s\* /win
Hi folks, command is a directory on the cdrive, my mistake was trying to get into command.com I think.
As my original question was to copy command.com which was answered by swapsthegreat then I will award the points to swaps.
Many thanks to both swaps and ahoffmann, your coments were greatly appreciated.
I will be back no doubt
Ned