Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Mon Oct 21, 2019 4:40 am


Username:
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
Font size:
 
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation code
Confirmation code:
In an effort to prevent automatic submissions, we require that you enter both of the words displayed into the text field underneath.
     

Topic review - Rsync progress display during transfer
Author Message
Post subject: Re: Rsync progress display during transfer  |  Post Posted: Tue Mar 03, 2015 8:39 am
bash "reset" command can also be used to clear the screen.
Post subject: Re: Rsync progress display during transfer  |  Post Posted: Tue Mar 03, 2015 8:31 am
Code:
alias copyfolder='rsync --progress -r'
to make an alias that will copy a folder recursively and display the transfer progress.
Post subject: Rsync progress display during transfer  |  Post Posted: Tue Mar 03, 2015 8:24 am
Rsync is a powerful tool to transfer files from one server to another or from one directory to another. To enable progress display while you transfer a file use the --progress switch (double dash).
Quote:
--progress show progress during transfer



Example how to use rsync progress display


Code:
$ rsync --progress source:/tmp/file .
file
      2,359,296   0%    1.07MB/s    0:14:39 


---------
Syncronizing directories from a remote directory to local directory or vice-versa can be done using rsync.

Be default, rsync doesn't show a progress bar while transfering files.

Rsync with progress bar
Use the below syntax in order for rsync to display a progress bar:

Code:
$ rsync -r -v --progress -e ssh root@remote-server:~/pictures /home/user/
receiving file list ...
366 files to consider
pictures/IMG_1141.jpg
      3849245 100%   32.30kB/s    0:01:56 (xfer#30, to-check=335/366)
pictures/IMG_1142.jpg
     4400662 100%   32.21kB/s    0:02:13 (xfer#31, to-check=334/366)
pictures/IMG_1172.jpg
     2457600  71%   32.49kB/s    0:00:29

in this case rsync used some arguments:
Quote:
-r, --recursive recurse into directories
-v, --verbose increase verbosity
-e, --rsh=COMMAND specify the remote shell to use (which in my case it was ssh)
--progress show progress during transfer


So basically, put --progress after your rsync command or you can create an alias like this:

Code:
$ alias rsync='rsync --progress'
$ alias rsync
alias rsync='rsync --progress'

You can add this alias to your ~/.profile and everytime you will be using rsync command, the progress bar will be shown durring file transfer.
Jump to:  
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO