• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Linux

Advanced Copy Command – Shows Progress Bar While Copying Large Files/Folders in Linux

How VPS by How VPS
November 2, 2018
in Linux, Operating System
0
0
SHARES
49
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Download and Install Advanced-Copy
    1. Compiling from Sources
  2. Automatic progress bar
  3. How to Use Advacned-Copy Command

Advanced-Copy is a powerful command line program which is very much similar, but little modified version of original cp command. This modified version of cp command adds a progress bar along with total time taken to complete, while copying large files from one location to another. This additional feature is very useful especially while copying large files, and this gives an idea to user about the status of copy process and how long it takes to complete.

Download and Install Advanced-Copy

There are two methods to install Advanced-Copy utility in Linux systems, either you compile from sources or using pre-compiled binaries. Installing from pre-compiled binaries should always work correctly and requires lesser experience and very effective for Linux newbies.

But I suggest you to compile from sources, for this you required original version of GNU coreutils and latest patchfile of Advacned-Copy. The whole installation should go like this:

Compiling from Sources

First, download the latest version of GNU coreutils and patchfile using wget command and compile and patch it as shown below, you must be root user to perform all commands.

# wget http://ftp.gnu.org/gnu/coreutils/coreutils-8.21.tar.xz
# tar xvJf coreutils-8.21.tar.xz
# cd coreutils-8.21/
# wget https://raw.githubusercontent.com/atdt/advcpmv/master/advcpmv-0.5-8.21.patch
# patch -p1 -i advcpmv-0.5-8.21.patch
# ./configure
# make

You might get the following error, while running “./configure” command.

checking whether mknod can create fifo without root privileges... configure: error: in `/home/tecmint/coreutils-8.21':
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

Run the following command on the terminal to fix that error and run the “./configure” command again.

export FORCE_UNSAFE_CONFIGURE=1

Once, compilation completes, two new commands are created under src/cp and src/mv. You need to replace your original cp and mv commands with these two new commands to get the progress bar while copying files.

# cp src/cp /usr/local/bin/cp
# cp src/mv /usr/local/bin/mv

Note: If you don’t want to copy these commands under standard system paths, you can still run them from source directory like “./cp” and “./mv or create new commands as shown”.

# mv ./src/cp /usr/local/bin/cpg
# mv ./src/mv /usr/local/bin/mvg

Automatic progress bar

If you want the progress bar to be appear all the time while copying, you need to add the following lines to your ~/.bashrc file. Save and close the file

alias cp='cp -gR'
alias mv='mv -g'

You need to logout and login again to get this work correctly.

How to Use Advacned-Copy Command

The command is same, the only change is adding “-g” or “–progress-bar” option with cp command. The “-R” option is for copying directories recursively. Here is an example screen-shots of a copy process using advanced copy command.

# cp -gR /Tecmint.com/ /data/

OR

# cp -R --progress-bar /Tecmint.com/ /data/

Advanced Copy Command – Shows Progress Bar While Copying Large Files/Folders in Linux

Advanced Copy Command – Shows Progress Bar While Copying Large Files/Folders in Linux

Here is the example of ‘mv‘ command with screen-shot.

# mv --progress-bar Songs/ /data/

OR

# mv -g Songs/ /data/

Advanced Copy Command – Shows Progress Bar While Copying Large Files/Folders in Linux

Please remember, original commands are not overwritten, if you ever need to use them or you’re not happy with the new progress bar, and want to revert back to original cp and mv commands. You can call them via /usr/bin/cp or /usr/bin/mv.

I really much impressed with this new progress bar feature, at least I would know some information of copy operation time and exactly what’s going on.

Overall I can say, it is really good tool to have in your pocket, especially when you are spending lots of time in copying and moving files through command line.

Source: tecmint.com

Tags: Linux Commandslinux guidelinux vps setup guide
Previous Post

An Easy Way to Hide Files and Directories in Linux

Next Post

29 Practical Examples of Nmap Commands for Linux System/Network Administrators

Next Post

29 Practical Examples of Nmap Commands for Linux System/Network Administrators

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet