Skip to content

Instantly share code, notes, and snippets.

@Cadichon
Last active September 25, 2019 00:09
Show Gist options
  • Save Cadichon/f78abb493a643aad127aabfa7635ecad to your computer and use it in GitHub Desktop.
Save Cadichon/f78abb493a643aad127aabfa7635ecad to your computer and use it in GitHub Desktop.
Progress cp

Download coreutils version 8.21 (TODO: port it for 8.31) and patch it.

cd /tmp
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

Run:

export FORCE_UNSAFE_CONFIGURE=1
./configure
make

Compiled binary will src/cp and src/mv New option will be -g or --progress-bar Output exemple:

0 files copied so far...                                              194.4 MiB /   8.4 GiB
[||--------------------------------------------------------------------------------]  2.3 %
Copying at   3.3 MiB/s (about 0h 5m 47s remaining)
/home/user/file.mp4                                                   194.4 MiB / 446.1 MiB
[||||||||||||||||||||||||||||||||||||----------------------------------------------] 43.6 %
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment