LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need help moving files. (https://www.linuxquestions.org/questions/linux-newbie-8/need-help-moving-files-535529/)

EYEdROP 03-07-2007 06:47 PM

Need help moving files.
 
Alright, I have Ubuntu and have 2 hard drives. /hda is an 80 GB, which is where Ubuntu is installed. /sda is my secondary drive with all of my media on it. Im trying to move some of the files to my /hda primary drive so that I can format my secondary from NTFS to FAT32. I cannot in any way access the /sda through the GUI, the permission is denied. I can look at the content of the drive with this command: sudo ls -l /mnt/windows


Password:
total 5228
dr-x------ 1 root root 0 2007-01-22 03:00 1d01035546256990de6cada51021
dr-x------ 1 root root 4096 2007-02-20 03:50 Disk Images
dr-x------ 1 root root 0 2007-02-18 12:30 Documents
dr-x------ 1 root root 0 2007-02-18 17:14 Games
dr-x------ 1 root root 0 2007-01-05 22:22 Guitar Stuff
dr-x------ 1 root root 8192 2007-03-02 15:50 Ians Photos
dr-x------ 1 root root 12288 2007-03-02 21:51 Incomplete
dr-x------ 1 root root 36864 2007-03-02 21:45 Limewire
dr-x------ 1 root root 4096 2007-03-02 21:39 Movie
dr-x------ 1 root root 8192 2007-02-15 19:24 Music
dr-x------ 1 root root 4096 2007-01-05 21:47 PC Game Patches and Files
dr-x------ 1 root root 0 2007-02-08 18:04 Rapidshare
dr-x------ 1 root root 4096 2007-02-19 18:53 $RECYCLE.BIN
dr-x------ 1 root root 0 2007-01-08 23:19 RECYCLER
dr-x------ 1 root root 4096 2007-01-05 22:05 ROM
-r-------- 2 root root 5241719 2007-01-23 21:55 rusty-sevens.mov
dr-x------ 1 root root 12288 2007-03-02 16:48 Software
dr-x------ 1 root root 4096 2007-01-08 16:14 System Volume Information
dr-x------ 1 root root 8192 2007-01-05 21:54 Tabs
ian@pR0BATR0N:~$

I want to move Guitar stuff, Ians photos, Movie, Music, ROM, Software, and Tabs to this directory on my 80GB: /home/ian/SAVE2

Can you guys guide me through this? I dont want to lose this data. Thanks a bunch :)

EYEdROP 03-07-2007 06:48 PM

Correction. My 80gb is called /hda1.

Quakeboy02 03-07-2007 06:52 PM

If you can read the directory, then what's the problem?
Code:

cp  -a /mnt/whatever/* /somedirectoryonyourotherdrive/whatever

EYEdROP 03-07-2007 06:58 PM

Sorry, I meant to say that I can see the contents of the directory under terminal, I just cant touch them from the gui because permission is denied (dosent ask for root password). I dont know if I can do change with the terminal. In which case I would like to move some files from the /sda5 to /hda1.

jay73 03-07-2007 07:04 PM

If that partition is NTFS, you would need to install ntfs-3g and then mount the partition like this:
mount -t ntfs-3g /dev/sda5 /mountpoint

Quakeboy02 03-07-2007 07:04 PM

OK, don't think of mounted filesystem by their device name. To your programs, and to copy ("cp"), /sda1 (I believe you mean /dev/sda1) does not exist as anything useful.

Have you tried doing "sudo chown /mnt" to whatever your userid is? You don't want to do anything that will write to the ntfs drive itself, but you can change the owner of /mnt without any risk. That should give you GUI access to point/grab/click copying.

Added:
Grrr, that should be "sudo chown youruserid /mnt/windows". Maybe I should go watch TV for awhile. :)

EYEdROP 03-07-2007 07:05 PM

Could you explain the command a little better? Im a bit of a newb to linux. can I copy seperate directorys (the ones I want) on /sda5 to /hda1?

EYEdROP 03-07-2007 07:06 PM

NM, I replied late.

jay73 03-07-2007 07:28 PM

Check the repositories for ntfs-3g and install it. Then bring up a terminal and at the command line you type:
su -
root password
mount -t ntfs-3g /dev/sda5 /mnt/windows

Have a peep in /mnt/windows; if it worked, you should actually be able to see your files. to move them over to you Linux partition, say, your home directory:

cp /mnt/windows/* /home

the * means any file; if you need a specific file, you need to specify its name:

cp /mnt/windows/myfile /home

If you want to move a number of files that have similar names, you could use * again to replace the differing parts:

1.mpg 2.mpg 3.mpg

could be copied at once like this:

cp /mnt/windows/*mpg /home

EYEdROP 03-07-2007 07:43 PM

on the last step of this http://everythingelse.wordpress.com/2006/07/19/89/, i get this:


ian@pR0BATR0N:~$ sudo apt-get install ntfs-config
Password:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package ntfs-config
ian@pR0BATR0N:~$

Quakeboy02 03-07-2007 07:55 PM

His first post established that he could read the files on the ntfs drive. Why would he need to load any software?

EYEdROP 03-07-2007 08:00 PM

I can look at what the file is called (only in terminal), but I cannot open it, or do anything with it in the GUI. Im not sure if I can do anything with it in the terminal.

jay73 03-07-2007 08:04 PM

It seems likely that the miror in question isn't available (anymore?at this time?).

Try this instead:

Type at the command line (as root):

gedit /etc/apt/sources.list

Add the following lines to the opened file:

deb http://mirrors.easynews.com/linux/ubuntu edgy main multiverse universe restricted
deb-src http://mirrors.easynews.com/linux/ubuntu edgy main multiverse universe restricted

Update your repository list:

apt-get update

Save the file and then try issueing this command:

apt-get install ntfs-3g

Note to Quakeboy: I know this ntfs-3g may seem pointless but I remember similar situations where I was denied graphical access to ntfs partitions until I installed ntfs-3g. Also, if you have ntfs-3g, there isn't any need to reformat ntfs to fat32: ntfs-3g is as functional and reliable as fat32 (which has plenty of limitations).

Quakeboy02 03-07-2007 08:07 PM

Have you actually tried doing anything with it via terminal? From your home directory in a terminal, try this, exactly as I have it:
Code:

sudo cp -a /mnt/windows/"Guitar Stuff"  .
Added:
Eyedrop, you can't succeed with having two people giving incompatible advice, so I'm outta here.

EYEdROP 03-07-2007 08:09 PM

sudo su
root@pR0BATR0N:/home/ian# gedit /etc/apt/sources.list
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

cannot open display:
Run 'gedit --help' to see a full list of available command line options.
root@pR0BATR0N:/home/ian#


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