LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Copy A File Off A CD To The Hard Drive In Command Line (https://www.linuxquestions.org/questions/linux-newbie-8/copy-a-file-off-a-cd-to-the-hard-drive-in-command-line-184025/)

nickae77 05-21-2004 04:21 AM

Copy A File Off A CD To The Hard Drive In Command Line
 
How do I copy a file off a CD to the hard drive using the command line? I want to install a driver for my video card because I can't run the GUI, so I have to download it off another computer and burn it to a cd and copy it to the hard drive and use the command line to install it.
Thanks a lot!

hw-tph 05-21-2004 04:34 AM

cp <location> <target>
...meaning, if your CD-ROM is mounted on /mnt/cdrom and the file is in the root of the CD, and you want to copy it to your current working directory:
cp /mnt/cdrom/filename .
...or to copy it to your home directory:
cp /mnt/cdrom/filename ~


Håkan

bones996 05-21-2004 04:35 AM

Try the following
cd /mnt/cdrom/"file directory" then
cp "file" "new location"

What happens is you change to the directory where the file is located & then you can use cp to copy it to the new location (full path name needed here).

Another way I do it from a backup looks like this:
cp /mnt/cdrom/home/foo/filename /home/foo

I find I have it a little more control over it when I use the full pathname for the file I want to copy.

edit: nuts always seems to happen I start to post & someone has already beat me to it :)

TigerOC 05-21-2004 04:36 AM

Decide where you want to copy the driver to (eg /usr/src) then do cp /cdrom/file_name /usr/src or cd cdrom then cp file_name /usr/src.

nickae77 05-21-2004 04:38 AM

Thanks for your help guys, i appreciate it!


All times are GMT -5. The time now is 01:00 AM.