Welcome to the most active Linux Forum on the web.
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-17-2009, 12:00 AM   #1
LQ Newbie
Registered: May 2009
Posts: 3

Rep: Reputation: 0
HOW TO COPY FROM usb to harddisk

BY 1> mkdir /mnt/usb 2> mount /dev/sda1 /mnt/usb 3> cp x.txt /mnt/usb
but then i tried
cd /mnt/usb 2> cp x.txt /root but failed so kindly tell me how to copy from usb to harddisk .
Old 05-17-2009, 01:20 AM   #2
Senior Member
Registered: Sep 2005
Location: Russia
Distribution: NixOS (
Posts: 1,899

Rep: Reputation: 68
What does "cat /mnt/usb/x.txt" do? Please post exact error messages from both cp and cat.
Old 05-17-2009, 02:18 AM   #3
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 657Reputation: 657Reputation: 657Reputation: 657Reputation: 657Reputation: 657
It would be more understandable if you put each command on a separate line. The first time I read it, I thought your ran "mkdir /mnt/usb 2".
Repeating the process and cutting and pasting the commands would provide us with the exact commands & error messages.

You should indicate what filesystem is on the usb stick. If it is fat32, which is the most common, use the filesystem vfat when mounting. You need to add options in the mount commands to change the ownership & permissions during the mount. E.G. If your username is "rkarmakar", you might use "sudo mount -t /dev/sda1 /mnt/usb -o rw,default,uid=rkarmakar,fmask=0110,dmask=0001".

I can't imagine that a usb stick would have the device node sda1, unless you are running an older kernel that uses the device node /dev/hda for the first pata disk.

Also remember that /root is for the root user. You can't copy files there as a normal user, and shouldn't be messing around with system directories without good reason.
Old 05-17-2009, 02:35 AM   #4
Senior Member
Registered: Sep 2005
Location: Russia
Distribution: NixOS (
Posts: 1,899

Rep: Reputation: 68
He is probably running an older (as in year 2003) kernel. RH 8.0 Psyche was released in 2002. It does look like he is running as root, as "mkdir /mnt/usb" is not something an unprivileged user could do. If the kernel is a bit newer, FS question may be especially interesting, as Linux kernel has been able to mount NTFS read-only for a significant amount of time, but the only widespread and mature NTFS-write implementation is userspace NTFS-3g (which usually needs to be mounted in its own way, without mount).
Old 05-25-2009, 09:39 AM   #5
LQ Newbie
Registered: May 2009
Posts: 3

Original Poster
Rep: Reputation: 0
thank you raskin, your cat command did not work but i borrowed the

at root i wrote

cp /mnt/usb/x.txt .

and the file was astonishingly copied from my usb to hard disk


usb disk

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 bootable cd to harddisk efm Linux - Hardware 2 02-20-2009 06:02 AM
Copy an entire install to second harddisk seriesx4 Linux - General 7 10-13-2005 11:44 AM
USB Harddisk enemorales Linux - General 2 07-10-2005 04:10 AM
[SUSE 9.1 PROF] How can I copy the setup files to my harddisk and start the setup? TheRealFalcon Linux - Distributions 1 08-07-2004 11:49 PM
3 Harddisk USB (autofs) MrAhmad Linux - Hardware 3 08-03-2003 09:54 PM

All times are GMT -5. The time now is 10:58 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration