HELP! Need to copy contents of a windows drive

I need to copy All files and directories to a new linux drive, from a windows drive. ie from /dev/sdb1 to dev/sdc1.

Yes. I’m a newb. Tried rsync, but apparently I can’t get the command correct to do this.

So

rsync -rv --progress source dest

Would be the command you want.

1 Like

you need to mount the disks so something like:

depending on how new we are talking you will need to make a dir for the mounts.

sudo mkdir /media/windows
sudo mkdir /media/linux
sudo mount /dev/sdb1 /media/windows
sudo mount /dev/sdc1 /media/linux

once mounted you can run rsync if you want, its a lot better at copying if interrupted but otherwise cp is the same on the first run

so something like:
cp /media/windows/* /media/linux/.

EDIT:
the cp may need a sudo, all of this should just work as long as you gave the proper sdb/sdc info, just copy past if look good.

life has taught me to read my commands very slowly when doing work on drives like this. one letter is all it takes to destroy a disk.

4 Likes

Fortunately I have two drives with identical data. (former windows software raid drives) So if i screw one up, Ill resort to drag and drop in Dolphin.

ohhh then you do want rsync it has an option for checking files that are same name / size and skipping if match or something like that

i cant find the option, it may be part of its native run but i thought it was a option… well anyway if you can get sgtawesomesauce s to run i would use that

1 Like

My default copy command is

rsync -r -v --progress --ignore-existing -u -s SOURCE DESTINATION

It will skip files when needed. If you want the destination to be the same as the original add --delete

1 Like

I’ve got it running now. I used a combination of Kenkoda’s mkdir and mount commands and a sudo rsync (Sgt Awesomesauce’s command). Thanks guys!

2 Likes

When I get done copying to the new drive the old windows drive will be reformatted to ext4 and mirrored to the new drive. and the second old drive will then be formatted into ext4 and put in a separate system and mirrored via rsync and a script to keep everything backed up.

2 Likes

These are the commands I used, for future reference.

sudo mkdir /media/windows
sudo mkdir /media/linux
sudo mount /dev/sdb1 /media/windows
sudo mount /dev/sdc1 /media/linux

sudo rsync -rv --progress /media/windows /media/linux

I had to use sudo due to a access permission on the new linux drive.

do you know of the history command?

or better yet my favorite, history | grep command-i-forgot-here

EDIT: also “!! sudo” is linux for “i fucking said to do it”

2 Likes

not sure if I do or not, to be honest. I’ve been cramming in a lot of information in the last few weeks, after building this new system and shedding myself of windows.

type it in, it lists every command that user has given,

useful for “where was i” after a call to nature

1 Like

CNTR-R then text is king. For looking up often used commands.

2 Likes

well sir you have me there, the time til command is run is much smaller this way

i didnt know of this and will have to try it out a few times. i have a few in my history that are && strings to do stuff that im too lazy to fix or script… this would enable me further

2 Likes

To tell the truth my first real experience with linux was with Mandrake years ago. And I had some of the original Redhat books(long gone now).

Mandrake was my jam

1 Like

Pressing CTRL-R again will step back through the search as well…Extra tip.

It took me a long time to find this little bash nuget. Had to share.

3 Likes

Love getting all the little tricks to make things easier.
It’s one way Linux and Autocad are similar is that command line is faster and more precise than point and click.

Knew about CTRL+R, but didn’t know about pressing it again. TIL!

2 Likes