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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
09-17-2007, 04:38 PM
|
#1
|
LQ Newbie
Registered: Sep 2007
Posts: 5
Rep:
|
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 04:54 PM.
Reason: Fixing Typo
|
|
|
09-17-2007, 04:58 PM
|
#2
|
Senior Member
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Rep:
|
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
|
|
|
09-17-2007, 05:00 PM
|
#3
|
LQ 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:
|
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
|
|
|
09-17-2007, 05:30 PM
|
#4
|
Senior Member
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Rep:
|
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.
|
|
|
09-17-2007, 05:34 PM
|
#5
|
LQ Newbie
Registered: Sep 2007
Posts: 5
Original Poster
Rep:
|
Quote:
Originally Posted by Brian1
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.)
|
|
|
09-17-2007, 05:48 PM
|
#6
|
Senior Member
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Rep:
|
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"
|
|
|
09-17-2007, 05:50 PM
|
#7
|
LQ Newbie
Registered: Sep 2007
Posts: 5
Original Poster
Rep:
|
Quote:
Originally Posted by PatrickNew
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.
|
|
|
09-17-2007, 05:51 PM
|
#8
|
Senior Member
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Rep:
|
Just post back if any of it gives you funky error messages. We'll help you through.
|
|
|
09-17-2007, 05:52 PM
|
#9
|
LQ 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:
|
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
|
|
|
09-17-2007, 05:56 PM
|
#10
|
Moderator
Registered: Aug 2002
Posts: 26,812
|
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.
|
|
|
09-17-2007, 06:02 PM
|
#11
|
Member
Registered: Oct 2003
Distribution: Gentoo rules them all
Posts: 279
Rep:
|
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
|
|
|
09-17-2007, 06:07 PM
|
#12
|
LQ Newbie
Registered: Sep 2007
Posts: 5
Original Poster
Rep:
|
Quote:
Originally Posted by PatrickNew
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.
|
|
|
09-17-2007, 06:18 PM
|
#13
|
LQ 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:
|
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 06:21 PM.
|
|
|
09-17-2007, 06:19 PM
|
#14
|
Senior Member
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Rep:
|
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 06:22 PM.
|
|
|
09-17-2007, 06:23 PM
|
#15
|
LQ Newbie
Registered: Sep 2007
Posts: 5
Original Poster
Rep:
|
Quote:
Originally Posted by PatrickNew
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...
|
|
|
All times are GMT -5. The time now is 01:44 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|