下载 GNU 的 coreutils。
cd /tmp
wget http://ftp.gnu.org/gnu/coreutils/coreutils-9.4.tar.xz
tar -xvJf coreutils-9.4.tar.xz
cd coreutils-9.4
下载 带有进度条的“cp”和“mv”修补包。
wget https://raw.githubusercontent.com/jarun/advcpmv/master/advcpmv-0.9-9.4.patch
patch -p1 -i advcpmv-0.9-9.4.patch
Run:
export FORCE_UNSAFE_CONFIGURE=1
./configure
make
Copy the two files cp and mv loacated under coreutils-8.31/src/ to /usr/local/bin:
cp src/cp /usr/local/bin/cp
cp src/mv /usr/local/bin/mv
centos7 优先级 不一样 不影响原系统
cd ~
mkdir bin
cp src/cp ~/bin/cp
cp src/mv ~/bin/mv
添加别名 ~/.bashrc:
alias cp='/usr/local/bin/cp -giR'
alias mv='/usr/local/bin/mv -gi'
重新登入 或 source ~/.bashrc
source .bash_profile
advcpmv包地址
https://aur.archlinux.org/packages/advcp/
文章评论