You are not logged in.
I use the command line for copying files frequently, normally having the status of how much has been copied doesn't matter, but for large files it would be nice to have some sort of status output. ATM antthing would be nice for output when moving or copying large files, how much has been copied, how much is left, a time estimate, something so I know I'm not staring at a frozen machine.
I know DD has status=progress, I use that all the time, do "cp" and/or "mv" have any means of giving you the status of the copy or move?
Offline
Offline
Not in the repository versions. There is a patched version of coreutils on the AUR, but I would recommend just using a different application with a "progress" option, like rsync.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
A couple of ways:
rsync --progress oldfile newfile
pv oldfile > newfile
Or try the AUR package advcp.
(edit) snaked again.
Last edited by 2ManyDogs (2016-09-20 20:17:34)
Offline
rsync --progress oldfile newfile
FWIW I generally prefer '--info=progress2' to '--progress'.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
man pv
I'll check that out
The tips to use rsync and it's options --info=progress2 and --progress are great, thanks to those who pointed that out and also thanks for mentioning pv. I've never used pv before and didn't know about it.
I've only used rsync a couple times. I was playing with rsync for the first time a few days ago to make some backups, I hadn't thought to use rsync instead of cp for large files.
Offline
just remember that it's not accurate on for instance USB transfers, as it shows you the progress of moving it into the USB cache, not the progress of it writing out, and therefore it can sit there at 100% for several seconds
Offline
just remember that it's not accurate on for instance USB transfers, as it shows you the progress of moving it into the USB cache, not the progress of it writing out, and therefore it can sit there at 100% for several seconds
I didn't know that, thank you. I posted this question because sometimes I'll have to move files that are either so big or there are so many that it takes many hours. Having some sort of status output so I know a copy or move is actually happening and that I didn't mistype, run out of space, or have a crash was my concern. More than once have I set something to copy or move and gone to bed not knowing if it was working properly, hoping for the best... not knowing gets old even though I've only had a fail a few times
Offline
In that case:
cp /path/to/src/* /path/to/dest
switch to another terminal:
ls -l /path/to/dest
Repeat the second as necessary to convince yourself it's working.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline