• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 291
  • Last Modified:

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
0
Ned_Kelly
Asked:
Ned_Kelly
  • 7
  • 4
1 Solution
 
swapsthegreatCommented:
try
 
cp /mnt/cdrive/command.com /win
0
 
ahoffmannCommented:
mcopy command.com /win
# even works without mounting floppy for FAT and VFAT floppies
0
 
Ned_KellyAuthor Commented:
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
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
ahoffmannCommented:
cp /mnt/cdrive/command.com/s\* /win
# or
cp '/mnt/cdrive/command.com/s*' /win
0
 
Ned_KellyAuthor Commented:
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
0
 
Ned_KellyAuthor Commented:
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
0
 
Ned_KellyAuthor Commented:
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
0
 
ahoffmannCommented:
please post exactly what you have done, and what you get
0
 
Ned_KellyAuthor Commented:
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
0
 
Ned_KellyAuthor Commented:
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
0
 
ahoffmannCommented:
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
0
 
Ned_KellyAuthor Commented:
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
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

  • 7
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now