Close Menu
    X (Twitter)
    Hectic GeekHectic Geek
    • Apps
      • Apps for Mac
      • Apps for PCs
      • Best Apps
    • Concepts
      • Comparison
      • For Geeks
      • IT Careers
    • Gadgets
      • Accessories
      • Best Work Laptops
      • Budget Laptops
    • GNU/Linux
      • Ubuntu
    • How To
      • Virtualization
      • Windows
      • Windows How-To
    Hectic GeekHectic Geek
    Home » gcp: Command-line Based File Copy Tool for Ubuntu Linux
    Ubuntu

    gcp: Command-line Based File Copy Tool for Ubuntu Linux

    GayanBy GayanMarch 1, 2012Updated:September 28, 20127 Comments5 Mins Read
    Twitter Reddit Telegram WhatsApp Email
    Share
    Twitter Reddit Telegram WhatsApp Email

    If you want to copy something using the command-line interface in GNU/Linux, then “cp” is like the universal tool ;-). Although it’s a quite powerful utility, but it has few drawbacks of its own as well.

    For instance, unlike with the file managers and their user friendly file copy/move tools, “cp” won’t output a lot of details while copying a file. However, we can use the “-v” attribute to get some basic info, such as the file being copied and the saved file name.

    But let’s say you were copying a large file, then other than looking at the LED indicator of your HDD, there’s no way to know how long it’s gonna take or the currently copied percentage, which are otherwise pretty useful.

    In that sense, if you’re looking for a file/folder copy utility that’s much rich in features than “cp”, then you should try this tool called “gcp”. It’s a command-line based tool, but unlike with “cp”, while copying a file, “gcp” gives you the estimated time, input/output file names (disabled by default) but most importantly it shows a progress bar and also even calculates the file copying speed too!.

    Main features …

    *. Lightweight and pretty user friendly.

    *. Supports copying files and folders.

    *. You can copy single or multiple (lists) files & folders too.

    *. Shows a nice progress bar, size of the file being copied, the current file copy speed, plus an “estimated time”. So you’ll know what’s happening at an any given time.

    *. The developer says that, unlike with “cp”, “gcp” also has the ability to skip copying a file and move to the next one, if it encounters any file copy errors as well (I did not test it though).

    *. If you interrupt the process (press “Ctrl” + “c” to cancel), then it’ll save the partially copied content rather than deleting it.

    *. Shows the file system type (whether it’s “ext4/3 …” so on), the source file and the destination file names. However, these details are hidden by default to keep things simple. But you can use the “-v” attribute to enable it (as shown below).

    *. You can save a list of files that needs to be copied and load it later.

    That’s pretty much it.

    If interested, you can install “gcp” in Ubuntu 12.04 Precise Pangolin and 11.10 Oneiric Ocelot (don’t have pre-build packages for other versions right now) by simply typing the below commands in your Terminal window.

    sudo apt-get install gcp

    Installing in other older Ubuntu versions  …

    “Both 11.10 and 12.04 user can skip this and scroll down a bit, if you want one or two simple examples”

    Launchpad doesn’t currently have pre-build packages of “gcp” for older versions of Ubuntu such as 11.04 Natty Narwhal, 10.10 and 10.04. But luckily, you can easily install “gcp” in those ones as well.

    Now I did not test this with those versions, instead, I manually installed it in Ubuntu 11.10. So the below method should work for you if you use those older versions of Ubuntu nonetheless.

    1. First we have to manually install a package called “python-progressbar”, which as you can guess from the name, is what that generates those pretty file copy progress-bars :D. For that, open your Terminal window and enter the below command.

    sudo apt-get install python-progressbar

    2. Now, go to this Gcp home page and download the latest package.

    2. Once the download completes, double click on the file and extract the content, to your Home folder for instance.

    3. Then, open your Terminal and change directory (“cd”) to that folder.

    For my “gcp” version, I’ll use the below command for that. But depending on your downloaded file’s version, please change the text marked in “Red” accordingly.

    cd gcp-0.1.3

    4. Then simply issue the below command which should install it.

    sudo python setup.py install

    If it’s successfully installed, then you should see an output similar to the below one (it only contains the last few lines) and it won’t take more than few seconds either.

    That’s it!. Now you can start using it.

    Few simple examples …

    The basic usage of “gcp” is as follows.

    gcp source-file destination

    Let’s say that I have a file called “2.iso” in my “Desktop” and I wanted to copy it to my “Home” folder. Then I’d use the below command for that.

    gcp Desktop/2.iso /home/gayan

    It should give me a pretty output 😉 while copying as shown in the above screenshots.

    If you have more than a single file, then use it in the following format.

    gcp first-file second-file destination

    For instance, let’s say that I have two files (called “video.mkv” and “disk-image.iso”) in my Desktop that I want to copy to my Home folder. Then I’d use the below command for that.

    gcp Desktop/video.mkv Desktop/disk-image.iso /home/gayan

    Copying folders …

    Copying the content of a folder is pretty easy. Just like with “cp”, we can use the “-r” attribute in the below format.

    gcp -r source-folder destination

    Again, if you have multiple folders then type their proper path, one after the other in the below format.

    gcp -r source-folder1 source-folder2 destination

    For an example, let’s say that I have a folder called “temp” in my Desktop that I want to copy my Home folder with “gcp”. Then I’d use the below command for that.

    gcp -r Desktop/temp /home/gayan/

    You can learn few of its other commands by reading the manual page as well. For that, please use the below command.

    man gcp

    So, as an ending note, if you’re a bit frustrated by the somewhat “limited” output details in “cp” and looking for a much user friendly, command-line based file copier that gives you a progress bar and few other useful outputs while running, then “gcp” is a must have!. A big thank goes to “Jérôme Poisson” for creating it.

    Share. Twitter Reddit Telegram WhatsApp Email
    Gayan

    An RHCE, 'Linux' user with 14+ years of experience. Extreme lover of Linux and FOSS. He is passionate to test every Linux distribution & compare with the previous release to write in-depth articles to help the FOSS community.

    Related Posts

    How to Check Linux CPU Usage?

    February 5, 2024

    Linux export Command: A Comprehensive Tutorial

    February 3, 2024

    Debian vs Ubuntu Server: A Brief Comparison for Beginners

    July 2, 2023

    CPU Based Simple System Stability and Benchmark Tester for Ubuntu Linux – systester

    June 16, 2023

    Typespeed: Typing Speed Testing Game for Ubuntu Linux

    March 12, 2023

    Debian vs Ubuntu in 2023- Which Linux OS is Right for You?

    January 6, 2023

    7 Comments

    1. Anonymous on September 8, 2013 11:15 pm

      So much bloat. What happened with the Unix philosophy?

      Reply
      • Gayan on September 9, 2013 7:28 am

        Well, I don’t know mate, but I kinda like this ;-).

        Reply
    2. Jörg Thalheim on September 9, 2013 1:16 am

      I use the following alias instead:

      alias cpv=”rsync -pogr –progress”

      Reply
      • Gayan on September 9, 2013 7:27 am

        Thank you Jörg.

        Reply
    3. dbrower on September 9, 2013 1:22 am

      alias gcp=’rsync -P’

      is close enough for most people.

      Reply
      • Gayan on September 9, 2013 7:27 am

        Thank you.

        Reply
    4. NB on August 17, 2017 6:38 am

      Has any one had sucess installing this on CentOS? I get a progress bar error.

      Thanks!

      Reply
    Leave A Reply Cancel Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Latest Posts

    Transforming Geek Culture with Advanced Software Development

    April 8, 2024

    The Role of Technology in Enhancing Digital Signage Solutions

    February 21, 2024

    How to Check Linux CPU Usage?

    February 5, 2024

    Linux export Command: A Comprehensive Tutorial

    February 3, 2024

    [Fixed] HDMI No Signal to TV or Monitor on Windows 10/11

    November 7, 2023

    AlmaLinux vs Ubuntu – How to Select the Best One?

    October 22, 2023

    Subscribe to Updates

    Get the latest news and updates from Hectic Geek. We won't overload you or sell your data!

    Contact
    • About Us
    • Contact Us
    • Privacy Policy
    • Write for Us
    X (Twitter)
    © 2026 Hectic Geek.

    Type above and press Enter to search. Press Esc to cancel.