ecp 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. .TH ECP 1
  2. .SH NAME
  3. ecp \- fast copy, handling errors
  4. .SH SYNOPSIS
  5. .in +.5i
  6. .ti -.5i
  7. .B ecp
  8. [
  9. .B \-bcprvZ
  10. ] [
  11. .B \-B
  12. .I block-size
  13. ] [
  14. .B \-e
  15. .I max-errors
  16. ] [
  17. .B \-i
  18. .I issect
  19. ] [
  20. .B \-o
  21. .I ossect
  22. ] [
  23. .B \-s
  24. .I sector-size
  25. ]
  26. .I sectors
  27. .I input
  28. .I output
  29. .SH DESCRIPTION
  30. .I Ecp
  31. copies
  32. .I sectors
  33. disk sectors of the specified
  34. .I input
  35. file to the specified
  36. .I output
  37. file.
  38. .I Ecp
  39. copies multiple sectors (a `block') at a time for speed.
  40. When
  41. .I ecp
  42. encounters an I/O error,
  43. it transfers the current block again,
  44. assuming the file is seekable,
  45. one sector at a time,
  46. prints the sector number(s) of the error(s),
  47. and continues copying.
  48. .PP
  49. Options are:
  50. .TP 4
  51. .B \-b
  52. reblock
  53. .IR input
  54. on short reads;
  55. this was used mainly when reading a pipe on standard input
  56. on 4.2+BSD systems.
  57. .TP
  58. .B \-B
  59. sets the block size (16,384 bytes by default) to
  60. .IR block-size .
  61. .TP
  62. .B \-c
  63. ask for confirmation on
  64. .B /dev/cons
  65. before starting the copy.
  66. .TP
  67. .B \-e
  68. sets a maximum number of consecutive I/O errors to permit
  69. at the beginning of the copy before quitting to
  70. .IR max-errors .
  71. Lots of consecutive errors may indicate a deeper problem,
  72. such as missing media.
  73. By default there is no limit.
  74. .TP
  75. .B \-i
  76. seeks to sector
  77. .I issect
  78. (assuming zero-origin)
  79. before beginning input.
  80. .TP
  81. .B \-o
  82. seeks to sector
  83. .I ossect
  84. (assuming zero-origin)
  85. before beginning output.
  86. .TP
  87. .B \-p
  88. print reassuring progress reports;
  89. helpful mainly when dealing with cranky hardware.
  90. .TP
  91. .B \-r
  92. copy sector groups in reverse order,
  93. assuming the files are seekable;
  94. this is most useful when
  95. .I input
  96. and
  97. .I output
  98. overlap.
  99. .TP
  100. .B \-s
  101. sets the sector size (512 bytes by default) to
  102. .IR sector-size .
  103. .TP
  104. .B \-v
  105. verify the copy by rereading the
  106. .I input
  107. and
  108. .I output
  109. files after copying all sectors.
  110. This is intended to force the disk to deliver the actual
  111. data written on it rather than some cached copy.
  112. The locations of any differences are printed.
  113. .TP
  114. .B \-Z
  115. `Swizzle' the input: stir the bits around in some fashion.
  116. Intended for diagnosing bad disks by copying a disk to itself
  117. a few times with swizzling on (to defeat caching in operating systems
  118. or disk controllers).
  119. .SH "SEE ALSO"
  120. .I fcp
  121. in
  122. .IR cp (1),
  123. .IR dd (1),
  124. .IR dup (3)
  125. .SH BUGS
  126. .BR \-i ,
  127. .BR \-o ,
  128. .BR \-r ,
  129. .B \-v
  130. and error retries only work on devices capable of seeking.
  131. .PP
  132. The set of options reflects decades of experience
  133. dealing with troublesome hardware.
  134. .PP
  135. If the input file is a tape and
  136. the last record on the tape before a file mark is less than
  137. .I blocksize
  138. bytes long,
  139. then
  140. .I ecp
  141. will read through past the file mark and into the next file.