File transfer and synchronisation (wget, scp, rsync)

There are many file transfer tools, we are going to discover some of them such as wget, scp and rsync.

wget

Wget is an online control tool intended to transfer files via the HTTP, HTTPS et FTP protocols.

limit of bandwidth (ex: 100k).

Resume a partial download.

Download recursively.

Download URLs contained in the file.

Define a file extension to download solely (ex: .png).

Define a file extension not to download (ex: .jpg).

Change the number of attempts set at 20 by default.

Here are some examples of use of wget :


scp

scp is a file transfer tool between two posts based on SSH which can guarantee you secured exchanges.
It is noteworthy that this transfer method is not recommended if you transfer
Il faut noter que cette méthode de transfert n’est pas recommandé si vous transférer un grand de fichier de petite taille.

Transfer recursively.

Keep the file parametersConserver (dates, access and rights).

Specify the connection port.


rsync

rsync is file synchronisation tool on a control line between 2 directories regardless of their location.
rsync thus allows to synchronize and transfer files from a source to a destination, it can be installed and used according to the following way :

Description number one.

copy recursively while keeping the permissions and without following symlinks.

Display the list of the copied files.

Use ssh to transfer your files.

Compress your files before transferring them.

Display what rsync is going to synchronize but without executing the command.

Exclude an extension, a file or a folder from the transfer.

Include an extension, a file or a folder from the transfer.

Delete the files in the output folder not present in the source folder at the end of the transfer.

Here is an example of rsync that needs the use of parameters described above :