May 23, 201115 yr I'll keep this brief. My goal is to move all of my contents of Disc 6 (500gb drive) to Disc 3 (2 tb drive). The goal being to make Disc 6 a Cache drive. Disc 6 file structure has "Movies" "Random" "Pictures" Disc 3 has: "Movies" "Random" I looked at the Wiki and this seems to be the method I want: "Wildcards Wildcards are available as well. For example, if you want to copy all of the files from Disk 2 over to Disk 3, use the mv command like this: mv /mnt/disk2/* /mnt/disk3 In this example, all files and folders on Disk 2 would be relocated over to Disk 3 in the exact same folder structure as it was on Disk 2" So at the command prompt type: mv /mnt/disk6/* /mnt/disk3 Am I correct that this will move all the contents of Disc 6 to Disk 3 and the movies will be automatically put in the "movies" folder on Disc 3. Also, it will not erase any of the movies already in the "movies" folder in disc 3? Thanks for checking to make sure I don't make a mistake!!
May 23, 201115 yr I would use mc to copy files around. Also, using cp might be better than mv as you can check everything has copied without problems before deleting from the original source.
May 23, 201115 yr You want cp so you can use its -p option to maintain ownership and dates/times. Then when you're happy delete the source files. Format would be: cp -rp /mnt/disk2/* /mnt/disk3/ that's cp space -rp space /mnt/disk2/* space /mnt/disk3/ later: (be vewy caweful) rm -r /mnt/disk2/*
May 23, 201115 yr Author Ok, so for me it would be cp -rp /mnt/disk6/* /mnt/disk3/ Then after its done: rm -r /mnt/disk6/* What does that last line do? Erase the drive?
May 23, 201115 yr rm is the unix delete. The -r options says do it recursively, hence the need for caution. rm --help would display the other options.
May 23, 201115 yr Author Hmm recursively, not sure what that means, but I guess the bottom line is I will make sure that everything is backed up before I delete it. Thanks for your help!
May 23, 201115 yr The effect of recursion here is that everything beneath the target gets deleted; it follows directories to the furthest level, deleting everything. Without the -r it would not follow directories.
Archived
This topic is now archived and is closed to further replies.