Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Situation: If I entered a copy command like cp -rf /src/ /dsc/ then I am waiting several minutes for copy large directories. I forgot to put -v flag to verbose an output, Can I do it during copying?

share|improve this question
up vote 18 down vote accepted

No you can't, but you could use the watch command to look at the destination directory to see how the process is progressing, eg.

watch ls -l /dsc/
share|improve this answer
    
Please add watch "find . | wc -l" as well. I found it better since your command only shows one level depth. – guy mograbi Jan 7 '15 at 8:29

I propose :

watch du -sh /dsc/
share|improve this answer
2  
Since this is just an improvement to an existing answer, consider suggesting an edit instead. – muru Jun 20 '15 at 16:21

You could always use rsync instead, you'll atleast get to see the files that are being copied

rsync -rva /src/ /dst/

Of-course this only works before you start copying as an alternative to cp. The good news is though that rsync will only copy the files it needs to so you can kill your long-running cp command run the rsync command and it will pick up where cp left off.

share|improve this answer

I recommend to use Midnight Commander in case when you need to see a progress of files copying.

  1. Install Midnight commander:

    apt-get install mc
    
  2. Open it:

    mc
    
  3. On first panel open source, on second - destination. Start copying using "F5".

MC will display nice and informative progress dialog.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.