Have you ever felt clueless (about what is going on) while waiting for a large file to get copied through cp command? Ever wanted cp command to display progress bars and other useful information (like total time taken to copy etc)? If the answer is yes, then Advanced-Copy is the solution.
Advanced-Copy (cp) is a command line utility which is nothing but a modified version of the original cp command that displays progress bars while copying files. This is especially useful while copying large files so that user gets an idea about the current status of the copy process.
NOTE – Looking for another cp alternative? Read our article on gcp command.
Advanced Copy (cp) Command In Linux
NOTE – All the instructions and examples presented in this article are tested on Ubuntu 13.04
A Brief Tutorial
To use advanced copy command, just add command line option -g while executing this command.
Here is an example screen-shot of a copy operation using advanced copy command:
So you can see that a couple of nice progress bars are shown while copy operation is going on. Once the copy is complete, this command displays some more useful information.
Useful information like number of files, total size, time taken and rate of transfer are displayed once the copy operation completes.
NOTE – I used ./cp rather than cp because I compiled this new advanced cp command from sources but did not copy it in standard system paths. Go through the Download/Install section for more information.
Here are some of the important links :
Though you can directly download the pre-compiled binaries but as recommended by the author himself, I downloaded the sources and compiled the advanced copy command from source. I used the following steps in this process :
$ wget http://ftp.gnu.org/gnu/coreutils/coreutils-8.21.tar.xz $ tar xvJf coreutils-8.21.tar.xz $ cd coreutils-8.21/ $ wget http://zwicke.org/web/advcopy/advcpmv-0.5-8.21.patch $ patch -p1 -i advcpmv-0.5-8.21.patch $ ./configure $ make
While running the second-last step i.e., configure, I got the following error :
configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check) See `config.log' for more details.
I used the following command to solve this error :
$ export FORCE_UNSAFE_CONFIGURE=1
Other than this problem, all the other steps executed successfully. These steps also produced an advanced mv command. Just like advanced cp command, advanced mv command is also superior to original mv command in terms of the progress bar feature that it provides. Read Compile from sources section on the download page for instructions on replacing original cp/mv command with advanced cp/mv command.
- Has same name as that of original copy command ie cp.
- Provides status of copy operation through progress bars.
- Provides more useful information when the copy operation completes.
- Need to replace original cp command (from standard system path) with this command to make it globally available.
- Compilation from sources could be required in some cases.
- The only main feature available is the progress bar. Other features are still under development.
I was impressed with the progress bar feature though I feel that more such missing features should be identified and added to advanced cp command. Users need to be careful about the stability issues of advanced cp command before replacing original cp command with it. All in all, I would say that it is a good utility to have in your kitty especially if you spend a lot of time copying and shifting files through command line.
Have you ever used advanced cp or any other cp-like command line utility? Share your experience with us.