Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-21-2004, 05:21 AM   #1
LQ Newbie
Registered: May 2004
Posts: 4

Rep: Reputation: 0
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!
Old 05-21-2004, 05:34 AM   #2
Senior Member
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
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 ~

Old 05-21-2004, 05:35 AM   #3
Registered: Sep 2003
Location: Pennsylvania
Distribution: Debian Squeeze
Posts: 106

Rep: Reputation: 15
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

Last edited by bones996; 05-21-2004 at 05:38 AM.
Old 05-21-2004, 05:36 AM   #4
Senior Member
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
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.
Old 05-21-2004, 05:38 AM   #5
LQ Newbie
Registered: May 2004
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for your help guys, i appreciate it!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to copy-paste on command line? jameshao Linux - General 3 02-02-2009 02:14 AM
hard drive information with command line Mugatu Linux - Newbie 3 01-08-2004 09:26 AM
copy a cd from the command line illtbagu Linux - General 32 02-09-2003 08:08 PM
command line CDR / copy file rioguia Linux - Newbie 4 10-05-2002 05:52 AM
Copy Paste under command line? Stingreen Linux - General 7 02-10-2002 07:46 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:55 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration