You are not logged in.
Is there way to show the progress of mv, cp or rm a large file? (maybe percentage or speed of transfer)
Sometimes, when I try do something to a large file with one of those three commands, there is not way to know if it gets stack or not.
Last edited by kdar (2011-05-21 15:33:27)
Offline
If you don't mind patching yourself: http://www.beatex.org/web/advancedcopy.html
Also, on the aur, there's something called ecp, which is an extended cp with mv functionality and progress-bar, but it's rather old...
Maybe others know a better solution...
Offline
Offline
Offline
I once had an alias for rsync for this purpose. Can't find it right now, but must have been something like the following (iirc):
alias copy='rsync -r -v --progress'
Last edited by derFrank (2011-05-21 18:07:59)
Offline
1.
rsync -aP
2. A zsh function.
(strace required)
cp_p()
{
strace -q -ewrite cp -- "${1}" "${2}" 2>&1 \
| awk '{
count += $NF
if (count % 10 == 0) {
percent = count / total_size * 100
printf "%3d%% [", percent
for (i=0;i<=percent;i++)
printf "="
printf ">"
for (i=percent;i<100;i++)
printf " "
printf "]\r"
}
}
END { print "" }' total_size=$(stat -c '%s' "${1}") count=0
}
3. A zsh function.
(pv required)
cp_p2()
{
if [ `echo "$2" | grep ".*\/$"` ]; then
pv "$1" > "$2""$1";
else pv "$1" > "$2"/"$1";
fi ;
}
arst
Offline
If you don't mind patching yourself: http://www.beatex.org/web/advancedcopy.html
---snip---
This looks really good, as it's simply the original cp with the patch. I wonder why the GNU devs can't add something similar to cp and mv, as this feature has been in demand since forever.
Offline
That Advanced Copy is in the AUR as 'advcp', which I just adopted: https://aur.archlinux.org/packages.php?ID=45056
I also had it install 'amv' so that we can have a 'mv' with the patch.
This account replaced by 'iv597'. Just can't delete old accounts on here...
Offline