复制效果:
效果

安装

作者地址:jarun/advcpmv: A patch for GNU Core Utilities cp, mv to add progress bars (github.com)

手动安装

Index of /gnu/coreutils

  1. 下载相应的依赖coreutils安装包:wget http://ftp.gnu.org/gnu/coreutils/coreutils-9.1.tar.gz
  2. 解压依赖:tar -zxvf coreutils-9.1.tar.gz
  3. 切换进入依赖目录:cd coreutils-9.1.tar.gz
  4. 拉取作品补丁:wget https://raw.githubusercontent.com/jarun/advcpmv/master/advcpmv-0.9-9.1.patch
  5. 编译安装:./configure && make
  6. 复制生成文件:cp ./src/cp ../advcp cp ./src/mv ../advmv
  7. 移动到安装目录:
    sudo mv ./advcpmv/advcp /usr/local/bin/
    sudo mv ./advcpmv/advmv /usr/local/bin/
  8. 加入自己当前bash:

    -i 表示交互复制或者移动,-g为显示进度条

    echo alias cp '"/usr/local/bin/advcp -ig"' >> ~/.bashrc
    echo alias mv '"/usr/local/bin/advmv -ig"' >> ~/.bashrc

使用作者脚本安装

  1. 下载并执行脚本:curl https://raw.githubusercontent.com/jarun/advcpmv/master/install.sh --create-dirs -o ./advcpmv/install.sh && (cd advcpmv && sh install.sh)
  2. 同上进行移动和加入bash:
    sudo mv ./advcpmv/advcp /usr/local/bin/
    sudo mv ./advcpmv/advmv /usr/local/bin/
    echo alias cp '"/usr/local/bin/advcp -ig"' >> ~/.bashrc
    echo alias mv '"/usr/local/bin/advmv -ig"' >> ~/.bashrc