LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices



Reply
 
Search this Thread
Old 05-17-2009, 01:00 AM   #1
RATHINDRA NATH KARMAKAR
LQ Newbie
 
Registered: May 2009
Posts: 3

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


I USE RED HAT 8.0 (PSYCHE) I COPIED FROM MY harddisk to (SANDISK MICRO CRUZER)
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, 02:20 AM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

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, 03:18 AM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
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, 03:35 AM   #4
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

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, 10:39 AM   #5
RATHINDRA NATH KARMAKAR
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
syntax

at root i wrote

cp /mnt/usb/x.txt .

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


Reply

Tags
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 07:02 AM
Copy an entire install to second harddisk seriesx4 Linux - General 7 10-13-2005 12:44 PM
USB Harddisk enemorales Linux - General 2 07-10-2005 05: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-08-2004 12:49 AM
3 Harddisk USB (autofs) MrAhmad Linux - Hardware 3 08-03-2003 10:54 PM


All times are GMT -5. The time now is 02:45 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration