Total progress when copying or moving multiple files?

Author: guipravCreated Jul 30, 2015Updated Jan 30, 2024

When copying or moving multiple files using e.g. the command cp 1 2 3 target/directory/, those parameters are visible using ps aux.

I'm aware it's also possible to find the current working directory of a process using /proc/<pid>/cwd, so you could use that to determine which files cp / mv has already been operated on, as well as which files it's going to operate on. The command-line arguments are relative to the working directory, but it seems we could easily get that information and find out the full file paths.

With that information, wouldn't it be possible for cv to show the total progress (counting all files to be copied or moved) as well as the current file progress?

I would be willing to work on a pull request for this, but would first want to make sure you think it's doable, whether it's a good idea, etc.

Thanks.