Advanced-Copy is a powerful command line program that is a modified version of the cp command combined with the mv tool. The most obvious feature is the increase in the progress bar and the total time required to copy large files. This additional feature allows users to better understand the status of the copying process and the time it takes when copying large files.
Installing the Advanced-Copy user program in Linux requires building in source code using the following curl command, which downloads, patches, compiles coreutils, and generates the file.
# curl https://raw.githubusercontent.com/jarun/advcpmv/master/install.sh --create-dirs -o ./advcpmv/install.sh && (cd advcpmv && sh install.sh)
Errors may occur during installation, check if mknod can be created without root permissions, etc. Run the command on the terminal to fix the error and then run the curl command again:
# export FORCE_UNSAFE_CONFIGURE=1
# curl https://raw.githubusercontent.com/jarun/advcpmv/master/install.sh --create-dirs -o ./advcpmv/install.sh && (cd advcpmv && sh install.sh)
After the installation is complete, two new commands are created under./advcpmv/advcp and./advcpmv/advmv, replacing the previous cp and mv commands with these two new commands to get the progress bar when copying files:
# mv ./advcpmv/advcp /usr/local/bin/cp
# mv ./advcpmv/advmv /usr/local/bin/mv
You can also run commands such as./advcpmv/advcp and./advcpmv/advmv in the source directory or create new commands:
# mv./advcpmv/advcp /usr/local/bin/cpg
# mv./advcpmv/advmv /usr/local/bin/mvg
To display the progress bar when copying files and directories, add the following lines to the ~/.bashrc file:
# echo alias cp '/usr/local/bin/advcp -g' >> ~/.bashrc
# echo alias mv '/usr/local/bin/advmv -g' >> ~/.bashrc
You need to log out again to implement this function.
Linux uses the Advanced-Copy command, and the r option is used to recursively copy directories. Such as:
# cp-gR ubuntu-20.04.3-desktop-amd64.iso /home/tecmint/
perhaps
# cp-R --progress-bar ubuntu-20.04.3-desktop-amd64.iso /home/tecmint/
Displays a progress bar when moving a file, such as:
# mv --progress-bar Songs/ /data/
or
# mv -g Songs/ /data/
If you need to use the original command, or are not satisfied with the new progress bar and want to revert to the original cp and mv commands, you can call them through /usr/bin/cp or /usr/bin/mv without overwriting the original command.