How can I copy files/folders from an ubuntu computer on a ext4 filesystem to another ubuntu computer which also is on an ext4 filesystem, using a usb stick which uses a vfat filesystem without losing file permissions?
I've tried the basic ctrl-c from source computer, then ctrl-v to usb, then ctrl-c from usb then ctrl-v to target computer, and none of the file/folder permissions stay intact.
Best Answer
You can make a tar archive of the source, copy that to the other computer using the USB drive, and extract it there. Tar preserves file permissions.
1 - On the source computer:
2 - Copy
put_your_name_here.tar.gz
to the USB drive and then to the other computer3 - On the destination computer:
tar
will recreate the archived folder structure with all permissions intact.Those commands will archive the contents of the source folder and then extract them into the destination folder. If you want to copy the folder itself, then you should, at step 1:
The same mechanism could be used for single files.
If you can connect from one computer to the other using
ssh
, @siddharthart answer (rsync
) might be more practical.