NOTE: This article is 3 years or older so its information may no longer be relevant. Read on at your own discretion! Comments for this article have automatically been locked, refer to the FAQ
for more details.
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
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
A quick disclaimer...
Although I put in a great effort into researching all the topics I cover, mistakes can happen.
If you spot something out of place, please do let me know.
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
Other posts you may like...