Review your favorite Linux distribution.
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 08-19-2008, 05:01 PM   #1
Registered: May 2008
Location: USA
Distribution: CentOS, RHEL, Windows
Posts: 54

Rep: Reputation: 15
How to copy files from a usb pen drive to my linux box?

what is the command/process to copy files from my usb pen drive to my linux box if my system is entirely text based with no graphical interface? Thanks.
Old 08-19-2008, 05:03 PM   #2
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
You need to mount the device first (see mount's man page). You'll probably want to look at the output from dmesg to see what the kernel is calling your device. To copy files, use cp (again, see the man page).
Old 08-19-2008, 05:03 PM   #3
Registered: May 2007
Location: London, UK.
Distribution: Major:FC8. Others:Debian;Zenwalk; Arch; Slack; RHEL.
Posts: 544

Rep: Reputation: 30
is automounter service running?

if so then the pendrive should be mounted , enter command:

this should tell you where the pendrive is mounted and you can "cd /..." into the relevant directory.
Old 08-19-2008, 07:06 PM   #4
Senior Member
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
remember to use umount to unmount the USB device once you are finished with it else removing the device could cause a corruption where it's likely data could be writen to it. USBpen drives are the most at risk of this.
Old 08-20-2008, 03:54 AM   #5
LQ Newbie
Registered: Sep 2007
Location: Stellenbosch, South Africa
Distribution: Ubuntu 12.10 at home, Mac OS X on laptop
Posts: 20

Rep: Reputation: 0
when it's mounted, and you know the directory:

cp what-you-want-to-copy to-where-you-want-to-copy-it-to

for example:

cp /mnt/usb/* /home/user

if it has directories as well then you need to copy recursively:

cp -R /mnt/usb/* /home/user


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
Copy Files From Lexar USB Drive In Slackware 12.1 OWA14 Linux - Newbie 3 05-27-2008 07:50 PM
unable to copy files to pen drive(size problem)..pls help anant Linux - Newbie 8 12-28-2006 11:51 AM
usb pen drive with REDHAT linux sunlinux Linux - Hardware 2 12-13-2006 11:07 AM
Trouble with USB pen drive in Linux abhishek_p Linux - Hardware 1 12-02-2005 02:01 AM
copy files from your hard drive to usb key with Knoppix ziegen Linux - Distributions 1 08-09-2004 02:06 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:48 PM.

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
Open Source Consulting | Domain Registration