for some reasons, we lost power on our computer and the sync was interrupted, to continue from where it stopped, use the command below: rsync -P -update tut-* /media/hdd/tutorials To do that we can use: rsync tut-* /media/hdd/tutorials Our goal now is to only copy tutorial videos to external HDD. if we use the wildcard *.mp4 we would copy all the files with mp4 extension including Big Bug Bunny.mp4 and other video files not important now and miss some tutorial videos. all our tutorials names start with tut but, not all have an mp4 extension, some are avi or mkv. We have a Big Bug Bunny.mp4, tut01-installing ubuntu.mp4, and other files. The videos folder has many types of videos extensions. Let us now copy files locally from a folder named videos to tutorials on an external Hard Disk Drive (HDD). ![]() Please note that the wildcard ‘ ~‘ means that the folder is located in home/user/tutorials rsync -t linuxandubuntu:~/videos/*.avi ~/tutorials/ rsync commands locally are more like cp and mv commands which means that you can use it also not just for backing up data, but also to keep them organized or move them from origin folder.To copy files from a server on a folder called videos to a local folder on our computer named tutorials we can use the code below. The code above will copy all our videos with extension avi to our videos folder in our home directory. Suppose we have more than one file to be transferred with the same extension, we can use the code below: rsync -t *.avi linuxandubuntu:~/videos. Note that you can copy all files with the same extension using wildcards. rsync -t tutorial.avi linuxandubuntu:~/videos Today we are going to show you the most commonly used commands for starting right away.Īs we already know, good explanations are better with examples, and we will show you below how would you send a video called tutorial.avi from our ubuntu laptop to linuxandubuntu server on the folder videos located on the home folder. Rsync has too many commands you can see on its man page. Rsync allows a user only to copy files from or to remote hosts if either you are the local host ( host A) or the remote host ( host B) and not a third host ( host C) connected, pretending to transfer from A to B.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |