Command cp with Progress Bar
Useful for tracking the progress of copies via the command line.
cp command is part of GNU CoreUtils and one of the features that a lot of people wanted to be implemented would be a progress bar, but as this hasn’t happened yet, a programmer created a patch and made it available on GitHub that can be implemented on GNU CoreUtils and you use it!
The procedure is very simple, just follow the steps:
- 1. First of all make sure you have the software building tools on your computer, example:
- 2. Download GNU CoreUtils
- 3. Decompress
- 4. Enter the directory and then download the patch
- 5. Apply the patch
- 6. Compile
The binary will be created in the
src directory, ie
coreutils-8.32/src/cp, you can move it to replace the original
cp with the command:
sudo cp src/cp $(which cp) (cp copies cp 😃).
Or create an alias (I think most recommended):
And test, example:
If you want to avoid using this parameter, create the alias with the parameter, example:
vim ~/.vimrcand leave the alias in this file like this:
source ~/.bashrc and test without the parameter, it will be included automatically:
The same can be used for the
mv command which will also be in
src, however, give preference to the
-g parameter instead of the
, it is simpler! But honestly, I don’t see any use in using this in
mv because things are moved so fast that you don’t even need it.
That’s it for today!