?
Solved

Can copy floppy, but cant copy mounted cdrive

Posted on 2002-03-11
12
Medium Priority
?
269 Views
Last Modified: 2010-04-20
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
Comment
Question by:Ned_Kelly
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
12 Comments
 
LVL 1

Accepted Solution

by:
swapsthegreat earned 100 total points
ID: 6856001
try
 
cp /mnt/cdrive/command.com /win
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6856248
mcopy command.com /win
# even works without mounting floppy for FAT and VFAT floppies
0
 

Author Comment

by:Ned_Kelly
ID: 6856573
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
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
LVL 51

Expert Comment

by:ahoffmann
ID: 6856691
cp /mnt/cdrive/command.com/s\* /win
# or
cp '/mnt/cdrive/command.com/s*' /win
0
 

Author Comment

by:Ned_Kelly
ID: 6856845
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
 

Author Comment

by:Ned_Kelly
ID: 6856879
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
 

Author Comment

by:Ned_Kelly
ID: 6856949
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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6856955
please post exactly what you have done, and what you get
0
 

Author Comment

by:Ned_Kelly
ID: 6857135
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
 

Author Comment

by:Ned_Kelly
ID: 6857300
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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6857802
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
 

Author Comment

by:Ned_Kelly
ID: 6860533
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 Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month12 days, 8 hours left to enroll

777 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