Show progress during dd copy

来源:互联网 发布:pp助手mac版下载 编辑:程序博客网 时间:2024/04/30 21:30

dd is a popular, generic command-line tool for copying files from 1 location to another. It is often used to copy entire disk images.

Like many Linux command line tools, it operates silently unless something unexpected happens. Its lack of visual progress feedback is a nice feature for scripting. However, it can leave you wondering about its progress if you are interactivelydd-copying a large disk.

To illustrate, you run the following (valid, but perhaps not very useful) dd copy:

$ dd if=/dev/random of=/dev/null bs=1K count=100 


It will run for a few minutes as it copies (and immediately discards) 100 blocks of randomly generated data, each of size 1 KB.

To get a progress report while dd is running, you need to open another virtual terminal, and then send a special USR1 signal to thedd process.

First, find out the process id of the dd process by running the following in the new virtual terminal.
$ pgrep -l '^dd$'8789 dd$

 

 

Original Link:

http://linuxcommando.blogspot.com/2008/06/show-progress-during-dd-copy.html

原创粉丝点击