つまりこういうこと。約 300 秒に 1 回の割合で enter キーを入力したのと同じ意味になる。
% ls -la /proc/2156/fd total 0 dr-x------ 2 root root 0 Apr 18 11:25 . dr-xr-xr-x 8 root root 0 Apr 18 11:09 .. lrwx------ 1 root root 64 Apr 19 02:34 0 -> /dev/pts/1 lrwx------ 1 root root 64 Apr 19 02:34 1 -> /dev/pts/1 lrwx------ 1 root root 64 Apr 18 11:25 2 -> /dev/pts/1 lrwx------ 1 root root 64 Apr 19 02:34 3 -> /dev/sda l-wx------ 1 root root 64 Apr 19 02:34 4 -> badblocks_sda.txt % while [ 1 ]; do echo > /proc/2156/fd/0 ; sleep 300; done
結果は以下のような感じ。
% badblocks -v -s -w -o badblocks_sda.txt /dev/sda Checking for bad blocks in read-write mode From block 0 to 488386583 Testing with pattern 0xaa: done Reading and comparing: done Testing with pattern 0x55: done Reading and comparing: 49.99% done, 15:43:30 elapsed. (0/0/0 errors) 51.70% done, 15:48:30 elapsed. (0/0/0 errors) 53.40% done, 15:53:30 elapsed. (0/0/0 errors) 55.11% done, 15:58:29 elapsed. (0/0/0 errors) 56.81% done, 16:03:29 elapsed. (0/0/0 errors) (snip) 92.59% done, 17:48:30 elapsed. (0/0/0 errors) 94.30% done, 17:53:30 elapsed. (0/0/0 errors) 96.00% done, 17:58:30 elapsed. (0/0/0 errors) 97.70% done, 18:03:30 elapsed. (0/0/0 errors) 99.40% done, 18:08:30 elapsed. (0/0/0 errors) done Testing with pattern 0xff: 1.30% done, 18:13:30 elapsed. (0/0/0 errors) 3.30% done, 18:18:31 elapsed. (0/0/0 errors) 5.30% done, 18:23:30 elapsed. (0/0/0 errors) 5.39% done, 18:23:43 elapsed. (0/0/0 errors)