bubbl
Posts: 85
Joined: Sun Jul 14, 2013 9:15 pm
Location: United Kingdom
Contact: Website

Linux terminal - copy progress bar

Sat Nov 30, 2013 6:18 pm

If you want to copy something using the command-line interface in GNU/Linux, then “gcp” is like the universal tool.
- 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.

Code: Select all

sudo apt-get install gcp python-progressbar
example:
coping file …

Code: Select all

gcp source-file destination
coping folders …

Code: Select all

gcp -r source-folder destination
We're not here because we are free. We're here because we are not free. There is no escaping reason. No denying purpose. Because we both know without purpose, we would not exist.
http://www.bartbania.com/

User avatar
DeeJay
Posts: 2027
Joined: Tue Jan 01, 2013 9:33 pm
Location: East Midlands, UK

Re: Linux terminal - copy progress bar

Sat Nov 30, 2013 6:35 pm

bubbl wrote:If you want to copy something using the command-line interface in GNU/Linux, then “gcp” is like the universal tool.
But it seems to have dependency on running in an environment where X-windows is supported, even though it does not actively open a new window.

Code: Select all

pi@raspberrypi ~ $ gcp try.sh dummy
Traceback (most recent call last):
  File "/usr/bin/gcp", line 678, in <module>
    gcp = GCP()
  File "/usr/bin/gcp", line 190, in __init__
    sessions_bus = dbus.SessionBus()
  File "/usr/lib/python2.7/dist-packages/dbus/_dbus.py", line 211, in __new__
    mainloop=mainloop)
  File "/usr/lib/python2.7/dist-packages/dbus/_dbus.py", line 100, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 122, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ExecFailed: /usr/bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

bubbl
Posts: 85
Joined: Sun Jul 14, 2013 9:15 pm
Location: United Kingdom
Contact: Website

Re: Linux terminal - copy progress bar

Sat Nov 30, 2013 6:39 pm

DeeJay wrote:
bubbl wrote:If you want to copy something using the command-line interface in GNU/Linux, then “gcp” is like the universal tool.
But it seems to have dependency on running in an environment where X-windows is supported, even though it does not actively open a new window.

Code: Select all

pi@raspberrypi ~ $ gcp try.sh dummy
Traceback (most recent call last):
  File "/usr/bin/gcp", line 678, in <module>
    gcp = GCP()
  File "/usr/bin/gcp", line 190, in __init__
    sessions_bus = dbus.SessionBus()
  File "/usr/lib/python2.7/dist-packages/dbus/_dbus.py", line 211, in __new__
    mainloop=mainloop)
  File "/usr/lib/python2.7/dist-packages/dbus/_dbus.py", line 100, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 122, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ExecFailed: /usr/bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
huh. been running it on X-less machine for some time now and it works well... don't know why you get this error
We're not here because we are free. We're here because we are not free. There is no escaping reason. No denying purpose. Because we both know without purpose, we would not exist.
http://www.bartbania.com/

bubbl
Posts: 85
Joined: Sun Jul 14, 2013 9:15 pm
Location: United Kingdom
Contact: Website

Re: Linux terminal - copy progress bar

Sat Nov 30, 2013 6:42 pm

rsync -P as an alternative is close enough I think.
We're not here because we are free. We're here because we are not free. There is no escaping reason. No denying purpose. Because we both know without purpose, we would not exist.
http://www.bartbania.com/

Return to “Beginners”