On Fri, Nov 30, 2012 at 10:30 PM, Abraham <[email protected]> wrote:
> I am not sure I follow this discussion but 'watch' command is awesome.
>
> We all know that cp command doesn't give any feedback on how much of
> data is copied. So to see the amount of data copied while copying around
> 45 GB of data, I used watch.
>
> $watch du -s -BM 'target-file'
>
> This monitored the file size of my target-file. Thanks for the command. =)
>

The above will only give you a snapshot every 2 seconds (default) and
the cpu cycles and memory needed by du.

rsync does a better job of showing real time progress:

$ rsync --progress --archive <src_file/dir>  <dest_file/dir>

rsync can be used for "local" copy as well.
--progress shows % of the progress as well as time elapsed for each file.
--archive (see man page) but more importantly if target file exists
then it does *nothing* whereas cp will overwrite the file unless you
use the -n option.

After the job is over you also get a summary:

$ rsync --progress --archive debian-wheezy-DI-b3-amd64-kde-CD-1.iso cp.iso
sending incremental file list
debian-wheezy-DI-b3-amd64-kde-CD-1.iso
   679936000 100%  105.24MB/s    0:00:06 (xfer#1, to-check=0/1)

sent 680019118 bytes  received 31 bytes  104618330.62 bytes/sec
total size is 679936000  speedup is 1.00

-- Arun Khan
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to