Linux MintThis forum is for the discussion of Linux Mint.
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.
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.
Command line to copy from USB HDD to home? home is on sda1. I want to copy contents of home on sdb1. sda1 has mint 19 V2 Cinnamon on it. sdb1 has mint 18.0 Cinnamon on it. Both have a home partition. Would it be better to drag and drop, I tried drag and drop of one file and that worked.
Hm. You wrote: Would it be better to drag and drop
there is a command: cp. It has two arguments: cp from to
If you wish to copy more than one file you may need to use -r. see man page or examples on the net.
could you check exactly what was dragged? (I'm sure it had a different location/name, probably /home/tom/testfile, without /sdb1). Without seeing what did you really make hard to give better answer.
By the way, do you know the command mount?
Without seeing what did you really make hard to give better answer.
Quote:
Originally Posted by pan64
By the way, do you know the command mount?
Only a little.
I also tried cp /media/tom/9983149b-3a05-462b-96a6-939625e6c7b6/testfile sda1/home/tom/
cp: cannot stat '/media/tom/9983149b-3a05-462b-96a6-939625e6c7b6/testfile': No such file or directory
Without knowing how your mint 18 was partitioned I can't say the exact path to your home directory nor if the file system where it is located is actually mounted. Post the output of the lsblk command.
Post the output of the command
sudo fdisk -l (that is a small L)
You posted that /media/tom/9983149b-3a05-462b-96a6-939625e6c7b6/tom was the correct directory in #8 and the posted output appears to confirm but you did not use the same path in your copy command. You can always use the cd command to go that directory and use the ls command to view its contents.
cp /media/tom/9983149b-3a05-462b-96a6-939625e6c7b6/tom/testfile /home/tom/ - That worked. I want to copy the contents of home on sdb1 to sda1. I could copy the folder and it's contents to home on sda1. I think that would get me a home inside of home. If I copy the contents of home on sdb1 to home on sda1 I think I will then have multiples of the default folders - Audio, Desktop, Documents, etc. I don't see a way to move all my stuff from sdb1 to sda1 in one action. I might delete the default folders in home on sda1. Now that I enabled view to display hidden folders that might be a good idea. Do you have any suggestions?
I created testfolder in home on sda1 and also in /home/tom on sdb1. I copied some files and folders from there to testfolder on sda1. I then put the same files and folders in testfolder on sdb1 plus some additional files and folders. I did cp -R /media/tom/9983149b-3a05-462b-96a6-939625e6c7b6/tom/testfolder /home/tom/. That worked. No duplicate files or folders. I will next copy home from sdb1 to sda1.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.