You can mount your destination folder from your windows system as a drive in the Ubuntu system and use rsync to achieve your goal:
rsync -rtv source_folder/ destination_folder/
In the source_folder notice that I added a slash at the end, doing this prevents a new folder from being created, if we don't add the slash, a new folder named as the source folder will be created in the destination folder. So, if you want to copy the contents of a folder called Pictures into an existent folder which is also called Pictures but in a different location, you need to add the trailing slash, otherwise, a folder called Pictures is created inside the Pictures folder that we specify as destination.
The parameter -r
means recursive, this is, it will copy the contents of the source folder, as well as the contents of every folder inside it.
The parameter -t
makes rsync preserve the modification times of the files that it copies from the source folder.
The parameter -v
means verbose, this parameter will print information about the execution of the command, such as the files that are successfully transferred, so we can use this as a way to keep track of the progress of rsync.
This are the parameters that I frequently use, as I am usually backing up personal files and this doesn't contain things such as symlinks, but another very useful parameter to use rsync with is the parameter -a
.
rsync -av source/ destination/
The parameter -a
also makes the copy recursive and preserve the modification times, but additionally it copies the symlinks that it encounters as symlinks, preserve the permissions, preserve the owner and group information, and preserve device and special files. This is useful if you are copying the entire home folder of a user, or if you are copying system folders somewhere else.