Solved

Can copy floppy, but cant copy mounted cdrive

Posted on 2002-03-11
12
246 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
  • 7
  • 4
12 Comments
 
LVL 1

Accepted Solution

by:
swapsthegreat earned 25 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
 
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
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 several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now