9-Jan-2017
As great as
Linux/Bash is, sometimes I wish some of the built-in commands did a little bit more than the bare minimum. Of these the
'cp' command is something that I always thought should have had a way to show progress when copying files. There are many questions about this very thing on
StackExchange like
this one and
this one. My preferred solution is to use
'rsync' but I'm also a big fan of simplifying things and can never remember all the various command line options required. So this post shows my little trick to enabling file copy speed and percentage display when copying files.
I simply add the following line to my
~/.profile file:
Then I can do something like this...
...and the results look like this:
Lets see what those command line options all mean.
As a bonus, since
'rsync' is used as the underlying command to copy files, you can also copy files from remote servers, much like when using
'scp'.
Here's another useful alias I've created:
Add a filter/search option to the OS X Terminal history command
-i
A quick disclaimer...
Although I put in a great effort into researching all the topics I cover, mistakes can happen.
Use of any information from my blog posts should be at own risk and I do not hold any liability towards any information misuse or damages caused by following any of my posts.
All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle).
Use of any information contained in this blog post/article is subject to
this disclaimer.
Igor Kromin