LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Copy file from pen drive to disk (https://www.linuxquestions.org/questions/linux-desktop-74/copy-file-from-pen-drive-to-disk-610737/)

deostroll 01-03-2008 12:43 AM

Copy file from pen drive to disk
 
What is the command for copying a file from my thumb drive to my hardisk?

deepumnit 01-03-2008 12:46 AM

Dude, its:
Code:

cp source-directory/filename destination-directory
For more details:
Code:

man cp

deostroll 01-04-2008 02:32 AM

Usually when my root is at a place called media (cd /media - i.e. where I can access cdrom, floppy, etc) and do an ls, it says PEN DRIVE. Thats is the name I gave it while I use my thunb drive in winxp.

And when I try to execute that command it throws me some error.

deepumnit 01-04-2008 06:11 AM

Dear Newbie, without posting the errors, nothing's gonna work!

Poetics 01-04-2008 11:59 AM

You might also want to look at the "mount" manpage -- your computer has to know that you intend on using the device.

deostroll 01-04-2008 03:01 PM

Quote:

Originally Posted by Poetics (Post 3011267)
You might also want to look at the "mount" manpage -- your computer has to know that you intend on using the device.

My os (ubuntu) automatically detects and mounts(?), I guess. Otherwise I would not see something called PEN DRIVE on my desktop!!! And I am able to browse to that location using nautilus (the file explorer program). Currently I guess the name "PEN DRIVE" is creating the problem. That is the name I have assigned to the device volume while I was using the device in windows...I can't even move to the location when I do

Code:

cd /media/PEN DRIVE
I guess this would say that location PEN does not exist.

deepumnit 01-04-2008 05:50 PM

Dude, you should use:
Code:

cd /media/"PEN DRIVE"
OR
Code:

cd /media/PEN\ DRIVE

H_TeXMeX_H 01-05-2008 09:49 AM

Quote:

Originally Posted by deostroll (Post 3011509)
My os (ubuntu) automatically detects and mounts(?), I guess. Otherwise I would not see something called PEN DRIVE on my desktop!!! And I am able to browse to that location using nautilus (the file explorer program). Currently I guess the name "PEN DRIVE" is creating the problem. That is the name I have assigned to the device volume while I was using the device in windows...I can't even move to the location when I do

Code:

cd /media/PEN DRIVE
I guess this would say that location PEN does not exist.

the problem is the 'cd' command would interpret that as 'cd /media/PEN', it would simply discard the 'DRIVE'.

Code:

cd /media/PEN DRIVE
that means two arguments, and it will only read the first one.

Code:

cd "/media/PEN DRIVE"
this means only one argument, the one you want.


All times are GMT -5. The time now is 08:21 PM.