LinuxQuestions.org
Visit Jeremy's Blog.
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 09-17-2007, 05:38 PM   #1
Nobody404
LQ Newbie
 
Registered: Sep 2007
Posts: 5

Rep: Reputation: 0
Need Help Moving Files From Hard Drive to USB Device


Please note that I'm new to Linux, and know almost nothing about it before you answer-

I need to move two files from C:/, to a USB mass storage device, E:/, but I don't know any Linux Commands. I am using "Damn Small Linux". I would do this is Windows, but Windows reformats it into a useless form, so Linux is my only option.
Once again, I know nothing about Linux, or do I even understand the folders. Any help on how to do this would be appreciated.

Last edited by Nobody404; 09-17-2007 at 05:54 PM. Reason: Fixing Typo
 
Old 09-17-2007, 05:58 PM   #2
PatrickNew
Senior Member
 
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Rep: Reputation: 48
My guess is that the command will look like this:

Code:
mkdir /media/hardDrive
mkdir /media/usbDisk
mount /dev/hda1 /media/hardDrive
mount /dev/sda1 /media/usbDisk
cp /media/hardDrive/THE_PATH_AFTER_C:\ /media/usbDisk/
umount /media/hardDrive
umount /media/usbDisk
 
Old 09-17-2007, 06:00 PM   #3
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
What type of filesystem is on this so called C: and E: partitions?
If ntfs then you need to look into installing ntfs-3g for that. Several post on this subject here using the search tool.
Once you do that you need to mount the partitions using the mount command.
Then you can use the cp command to copy files.

Before installing ntfs you can do this.
Post output from the command as root ' /sbin/fdisk -l ' after plugging in the USB drive and wait 15 seconds. Then tell us what partition is the c: and e:.

The USB drive should be /dev/sda unless the internal computer drive is a sata, scsi, or using a pata mode module. If it is seen as straight IDE the it is /dev/hda for the first drive.

Brian
 
Old 09-17-2007, 06:30 PM   #4
PatrickNew
Senior Member
 
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Rep: Reputation: 48
Brian1 is right. My commands make some guesses, assuming that everything is very normal. They wil *probaly* work, but if they don't definitely look into what Brian1 has said.
 
Old 09-17-2007, 06:34 PM   #5
Nobody404
LQ Newbie
 
Registered: Sep 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Brian1 View Post
What type of filesystem is on this so called C: and E: partitions?
If ntfs then you need to look into installing ntfs-3g for that. Several post on this subject here using the search tool.
Once you do that you need to mount the partitions using the mount command.
Then you can use the cp command to copy files.

Before installing ntfs you can do this.
Post output from the command as root ' /sbin/fdisk -l ' after plugging in the USB drive and wait 15 seconds. Then tell us what partition is the c: and e:.

The USB drive should be /dev/sda unless the internal computer drive is a sata, scsi, or using a pata mode module. If it is seen as straight IDE the it is /dev/hda for the first drive.

Brian

I don't really understand what you're asking, you see, I don't understand Linux.

When I say C: and E:, I'm talking about Windows XP drives.

C:/ is my Computer's hard drive, and E:/ is a USB mass storage device.

I want to move

C:\Program Files\Datel\Action Replay XBOX\Saves\SID4Instal_InstallSID.zip

and

C:\Program Files\Datel\Action Replay XBOX\Saves\SID4Splint_LINUX_Prof.zip

to

E:\

So what command lines will I use?

(ps- I dont know if \ will show correctly in this forum, it's just a backslash.)
 
Old 09-17-2007, 06:48 PM   #6
PatrickNew
Senior Member
 
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Rep: Reputation: 48
I'd give my commands a shot if you just want to get this done and over with, but if you want to learn linux then I'd start googling "linux filesystem"
 
Old 09-17-2007, 06:50 PM   #7
Nobody404
LQ Newbie
 
Registered: Sep 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by PatrickNew View Post
I'd give my commands a shot if you just want to get this done and over with, but if you want to learn linux then I'd start googling "linux filesystem"
Well, I want to get this over with right now; I wont use linux much after this, except for in situations where I have a tutorial in front of me.
 
Old 09-17-2007, 06:51 PM   #8
PatrickNew
Senior Member
 
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Rep: Reputation: 48
Just post back if any of it gives you funky error messages. We'll help you through.
 
Old 09-17-2007, 06:52 PM   #9
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
I do not know the hardware on your machine at this time. Just because it is c: and E: is a windows reference that has nothing to do with Linux. Linux does not use drive letters. I am not a Damn Small Linux user of that distro and do not know the default installed apps. In most Windows 2000 and newer they default to NTFS filesystem. To understand that goto Google and read about filesystems. NTFS is not normally standardly installed in most distros. Damn Small Linux may but I don't know. Only you will know if you read the docs on the distro.

Now most USB drives should be formatted as VFAT for ease of use across many Operating Systems. But without that knowledge it is hard to say.

Now booted in linux and the USB drive plugged in do the following.
Goto a console and type the following commands and post the output. Maybe I make heads or tails of it.
su ( Then enter root's password )
/sbin/fdisk -l ( Post output of this command )

I would post info like partition sizes to tell what is what. Like if the USB is 120gig then let us know.

Once we know where everything is then one can write the commands needed.

Brian
 
Old 09-17-2007, 06:56 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,061

Rep: Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760
What do you mean by
Quote:
Windows reformats it into a useless form
How big are these files?
What type of drive (flash etc) is your external drive and how is it formatted?
Are you using windows explorer to copy the files by dragging and dropping?

Have you verified the zip files are still good?

At first glance it should not be an operating system problem.
 
Old 09-17-2007, 07:02 PM   #11
Mikhail_16
Member
 
Registered: Oct 2003
Distribution: Gentoo rules them all
Posts: 279

Rep: Reputation: 31
You need to figure out the device name of your HDD and your USB drives. This part is the one we can help you with the least. I suggest trying to run "dmesg | grep hd||sd" while in your linux environment. That should give your general idea what they might be.

Explanations:
mkdir /media <-- Just in case
mkdir /media/hardDrive <-- Empty folder that you will 'attach' the hard drive to
mkdir /media/usbDisk <-- Emptry folder that you will 'attach' the USB device to
mount /dev/hda1 /media/hardDrive <-- /dev/hda1 is the first partition of your harddrive (basically your C: drive). Try '/dev/hda2' instead if the first command doesn't work.
ls /media/hardDrive <-- see what's on the partition you mounted, if you see what looks like contents of you C: drive, proceed. if not, try again.
mount /dev/sda1 /media/usbDisk <-- same as above except in relation to the USB drive (your E
ls /media/usbDisk <-- see similar note above.
cp /media/hardDrive/PATH_TO_FILE1 /media/usbDisk/ <-- Copy FILE1 to the USB. You are replacing C:\ with /media/hardDrive in the path. Help yourself by using TAB for autocomplete the paths.
cp /media/hardDrive/PATH_TO_FILE2 /media/usbDisk/ <-- Same as above
umount /media/hardDrive <-- Detach the C: drive
umount /media/usbDisk <-- Detach the E: drive
 
Old 09-17-2007, 07:07 PM   #12
Nobody404
LQ Newbie
 
Registered: Sep 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by PatrickNew View Post
I'd give my commands a shot if you just want to get this done and over with, but if you want to learn linux then I'd start googling "linux filesystem"
Argh, the first line didnt work.

It says it cannot create the directory.


Ok, I don't think anyone understands, to understand you'll have you use have used windows.

Ok, I am on windows now.

On windows, I have saved onto the C:/ drive the two files I have mentioned above. The mass USB device, which is the E:/ drive, needs these files. They cannot be transfered through windows without incorrect reformatting; this is why I need Linux to transfer the files. The files are not saved in Linux, they are saved in the C:/ drive, which is the hard drive. I don't know how to access any files on my CPU, except for the root linux files, and I dont know how to access my USB storage device.

This is where I need help.
Sorry if I seem stupid, as a Windows user for years, Linux is very comfusing and complicated for me.

Ps- Maybe this may be a problem. My CPU is screwed up, It's too old X_X, and no newly-downloaded programs can have access to the internet. For some strange reason, it also cant boot-from-cd, so I have both windows and Linux running at the same time, and I'm using Internet Explorer to browse the internet right now. I'm not addressing this issue for answering, I'm just presenting this in case it may cause a problem.
 
Old 09-17-2007, 07:18 PM   #13
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
Again one needs to know the hardware you have. Linux does not use drive letters. They are referred to as Device Blocks.

Also post the command you used and the exact error that resulted to help along the way.

This is a start so you may understand but again may not apply to your hardware setup.
If Drive letter C: is an IDE drive then it will known under linux as /dev/hda1. But this applies depending on the kernel it uses. Newer kernels use pata mode modules that make IDE seen like a scsi drive. So in this case it would be /dev/sda1 for Windows Drive C:.

We can get most of all the info we need from the fdisk command under Linux.

[ exclude the following, I did not read the last portion of your post about no working cd ]
If this is getting to be to much then look at maybe a Live CD like Knoppix or kubuntu or many others. It gives a gui interface and ususally support ntfs and so forth. But again Linux will not show drives as drive letters only as device blocks.
[ exclude ]

Now how are you running both Windows and Linux at the same time?

Last edited by Brian1; 09-17-2007 at 07:21 PM.
 
Old 09-17-2007, 07:19 PM   #14
PatrickNew
Senior Member
 
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Rep: Reputation: 48
You say you have them both running? On the same machine? Then you're probably using qemu for the DSL, and unfortunately it won't help you any. Now what do you mean "incorrect reformatting". I assumed you meant that windows wanted to alter or "update" your filesystem, but do you mean that the files end up corrupted. If that's the case, the external drive may be bad, but it's probably not window's fault.

NOTE:
Assuming that you mean that windows and linux are running at the same time on *different machines*, then running 'su' and giving it the password before running those commands should fix it. But if DSL is a window in Windows, then Linux can't help you any, sorry.

Last edited by PatrickNew; 09-17-2007 at 07:22 PM.
 
Old 09-17-2007, 07:23 PM   #15
Nobody404
LQ Newbie
 
Registered: Sep 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by PatrickNew View Post
You say you have them both running? On the same machine? Then you're probably using qemu for the DSL, and unfortunately it won't help you any. Now what do you mean "incorrect reformatting". I assumed you meant that windows wanted to alter or "update" your filesystem, but do you mean that the files end up corrupted. If that's the case, the external drive may be bad, but it's probably not window's fault.
---

Oh, so I cant use qemu? Well then, I'm screwed; my CPU always fails when it attempts to boot from CD...

ps- When I meant incorrect formatting, I was talking about the type of formatting. I'm using Linux to modify my xbox, and the xbox and windows require different formatting types to interact with the USB device. When I format it to the windows specs, the xbox has to reformat it to its specs, thus erasing the files.

I guess I'll try to download yet another version of Linux onto a CD and try again...
 
  


Reply


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
Copying files from internal Hard drive to USB 2.0 Hard Drive is NOT Behaving tubatodd Ubuntu 4 02-19-2007 05:32 PM
How to copy file from usb device to hard drive?????? Overcool Linux - Newbie 1 01-04-2007 08:06 PM
Cannot mount USB Flash Drive, 4 device files Hakala Linux - Software 1 04-01-2006 01:20 PM
Moving Hard Drive Files Zawi Linux - General 10 08-17-2005 12:08 PM
Moving/Writting files to 2nd hard drive LiquidFlame Linux - Newbie 2 04-25-2005 05:40 PM


All times are GMT -5. The time now is 05:28 PM.

Main Menu
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