LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 01-03-2008, 12:43 AM   #1
deostroll
Member
 
Registered: Aug 2007
Location: Bangalore
Distribution: fedora
Posts: 113

Rep: Reputation: 15
Copy file from pen drive to disk


What is the command for copying a file from my thumb drive to my hardisk?
 
Old 01-03-2008, 12:46 AM   #2
deepumnit
Member
 
Registered: Dec 2006
Location: NOIDA, India
Distribution: Debian, SUSE, Fedora
Posts: 334
Blog Entries: 1

Rep: Reputation: 31
Dude, its:
Code:
cp source-directory/filename destination-directory
For more details:
Code:
man cp
 
Old 01-04-2008, 02:32 AM   #3
deostroll
Member
 
Registered: Aug 2007
Location: Bangalore
Distribution: fedora
Posts: 113

Original Poster
Rep: Reputation: 15
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.
 
Old 01-04-2008, 06:11 AM   #4
deepumnit
Member
 
Registered: Dec 2006
Location: NOIDA, India
Distribution: Debian, SUSE, Fedora
Posts: 334
Blog Entries: 1

Rep: Reputation: 31
Dear Newbie, without posting the errors, nothing's gonna work!
 
Old 01-04-2008, 11:59 AM   #5
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
You might also want to look at the "mount" manpage -- your computer has to know that you intend on using the device.
 
Old 01-04-2008, 03:01 PM   #6
deostroll
Member
 
Registered: Aug 2007
Location: Bangalore
Distribution: fedora
Posts: 113

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Poetics View Post
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.

Last edited by deostroll; 01-04-2008 at 03:02 PM.
 
Old 01-04-2008, 05:50 PM   #7
deepumnit
Member
 
Registered: Dec 2006
Location: NOIDA, India
Distribution: Debian, SUSE, Fedora
Posts: 334
Blog Entries: 1

Rep: Reputation: 31
Dude, you should use:
Code:
cd /media/"PEN DRIVE"
OR
Code:
cd /media/PEN\ DRIVE
 
Old 01-05-2008, 09:49 AM   #8
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by deostroll View Post
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.
 
  


Reply



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
boot from any .iso file on a USB pen drive browny_amiga Linux - General 10 04-07-2008 04:44 PM
Copy File While File is Creating in Disk suhas7860 Linux - General 4 04-03-2007 08:38 AM
unable to copy files to pen drive(size problem)..pls help anant Linux - Newbie 8 12-28-2006 10:51 AM
unable to change pen drive file permission linuxmandrake Ubuntu 2 08-29-2006 12:12 PM
Mounting usb pen drive file permssions problems linuxmandrake Debian 1 10-10-2005 07:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 05:02 AM.

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