Solved

Can copy floppy, but cant copy mounted cdrive

Posted on 2002-03-11
12
252 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AWS EC2 Linux 1 55
Anti-virus for Linux Server 15 126
Linux/Apache File Ownership/Permissions 1 53
Help on running oracle SQL script in linux 3 36
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

895 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

14 Experts available now in Live!

Get 1:1 Help Now