Is it possible to check the progress of running cp process? Some processes respond to various KILL signals so that you can check what is their status. I know that I can run cp with parameter -v but what if forgot to do that, cp is running for a very long time and I want to know which file is being copied, or how many were already copied.
|
|
Yes, by running stat on target file and local file, and get a file size, i.e And you get the percentage of data copied by comparing the two value, that's it In a very basic implementation that will look like this:
|
||||
|
There are a few things you can do. You could attach strace -p [pid of cp] or you could get lsof -p [pid of cp] If you're running a big recursive pwdx [pid of cp] |
|||
|
|
|
What you can do is check the files at destination. If your cp commands is something like |
|||
|
|
|
When you're copying a lot of files, You can find out which file is being copied with
Under Linux, there are IO usage statistics in |
|||
|
|
|
To copy large Files and checking the Progress, I use the PV-Command It´s quite nice... |
|||||
|
