{"action":"created","issue":{"url":"https://api.github.com/repos/Xfennec/progress/issues/49","labels_url":"https://api.github.com/repos/Xfennec/progress/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/Xfennec/progress/issues/49/comments","events_url":"https://api.github.com/repos/Xfennec/progress/issues/49/events","html_url":"https://github.com/Xfennec/progress/issues/49","id":98062849,"number":49,"title":"Total progress when copying or moving multiple files?","user":{"login":"n2liquid","id":150153,"avatar_url":"https://avatars.githubusercontent.com/u/150153?v=3","gravatar_id":"","url":"https://api.github.com/users/n2liquid","html_url":"https://github.com/n2liquid","followers_url":"https://api.github.com/users/n2liquid/followers","following_url":"https://api.github.com/users/n2liquid/following{/other_user}","gists_url":"https://api.github.com/users/n2liquid/gists{/gist_id}","starred_url":"https://api.github.com/users/n2liquid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n2liquid/subscriptions","organizations_url":"https://api.github.com/users/n2liquid/orgs","repos_url":"https://api.github.com/users/n2liquid/repos","events_url":"https://api.github.com/users/n2liquid/events{/privacy}","received_events_url":"https://api.github.com/users/n2liquid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-07-30T01:21:47Z","updated_at":"2016-01-21T12:53:09Z","closed_at":null,"body":"When copying or moving multiple files using e.g. the command `cp 1 2 3 target/directory/`, those parameters are visible using `ps aux`.\r\n\r\nI'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.\r\n\r\nWith 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?\r\n\r\nI 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.\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/Xfennec/progress/issues/comments/173560864","html_url":"https://github.com/Xfennec/progress/issues/49#issuecomment-173560864","issue_url":"https://api.github.com/repos/Xfennec/progress/issues/49","id":173560864,"user":{"login":"cheater","id":195390,"avatar_url":"https://avatars.githubusercontent.com/u/195390?v=3","gravatar_id":"","url":"https://api.github.com/users/cheater","html_url":"https://github.com/cheater","followers_url":"https://api.github.com/users/cheater/followers","following_url":"https://api.github.com/users/cheater/following{/other_user}","gists_url":"https://api.github.com/users/cheater/gists{/gist_id}","starred_url":"https://api.github.com/users/cheater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheater/subscriptions","organizations_url":"https://api.github.com/users/cheater/orgs","repos_url":"https://api.github.com/users/cheater/repos","events_url":"https://api.github.com/users/cheater/events{/privacy}","received_events_url":"https://api.github.com/users/cheater/received_events","type":"User","site_admin":false},"created_at":"2016-01-21T12:53:09Z","updated_at":"2016-01-21T12:53:09Z","body":"On my computer the order cp does things is deterministic - try figuring that part out. Of course, this won't work if the fs gets modified in the meantime.\r\n\r\nOnce you know the files' order you can check sizes."}}