0

How to use a USB hard disk to transfer files from Ubuntu to Windows 10 PC in a secure manner? I have not used that disk for a while but it was probably exposed to a few PCs that do not belong to me. What would be a secure way to use it? Ideally, I would like to preserve files on it.I would prefer some antivirus or such tool rather than reformatting whole disk, if there are any viruses there they are probably pretty old (disk was not used for a while)

Serge
  • 101
  • 2

1 Answers1

0

It depending on the Operating System you are using.

If it is a Windows machine, first I would recommend you formatting that usb disk drive into ext4 format, CAUTION: if you format the USB drive, as I am suggesting above, the information on your USB drive will be deleted forever!, but will prevent any automated scripts from executing when you plug in the USB. Then you can use command-line utility like robocopy:

robocopy C:\SourceDir E:\DestDir /E

the flag /E will also copy the empty folders as well.

If you are on a Linux machine, I would recommend using rsync, but first make sure your USB drive is mounted to your system. To find out your USB device use command tool like lsblk.

If you are moving from Windows machine to another windows machine, you could also download rsync utility for windows and use it. it will be preserved and you can always resume the copy if something interrupts the copy process

schroeder
  • 123,438
  • 55
  • 284
  • 319
Fsoc
  • 31
  • 3
  • Why use `rsync`? How is that a safe option? Why is `cp` not sufficient? – schroeder Sep 02 '20 at 09:22
  • Well, like the OP mentioned if he is not sure about the USB Disk and can`t trust it, better format it. Still there is noway of preserving files on that hard drive and be sure it is secure. – Fsoc Sep 02 '20 at 09:24
  • cp doesnt have an option for resuming. If something goes wrong during the copy process he will have to start over. Cp is not meant for large size files. – Fsoc Sep 02 '20 at 09:25