home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V6 / usr / man / man1 / dd.1 < prev    next >
Encoding:
Text File  |  1975-06-26  |  2.7 KB  |  119 lines

  1. .th DD I 5/15/74
  2. .sh NAME
  3. dd \*- convert and copy a file
  4. .sh SYNOPSIS
  5. .bd dd
  6. [option=value] ...
  7. .sh DESCRIPTION
  8. .it Dd
  9. copies the specified input file
  10. to the specified output with
  11. possible conversions.
  12. The standard input and output are used by default.
  13. The input and output block size may be
  14. specified to take advantage of raw physical I/O.
  15. .s3
  16. .ft I
  17. .lp +15 15
  18. option    values
  19. .ft R
  20. .lp +15 15
  21. if=    input file name; standard input is default
  22. .lp +15 15
  23. of=    output file name; standard output is default
  24. .lp +15 15
  25. ibs=    input block size (default 512)
  26. .lp +15 15
  27. obs=    output block size (default 512)
  28. .lp +15 15
  29. bs=    set both input and output block size,
  30. superseding
  31. .it ibs
  32. and
  33. .it obs;
  34. also, if no conversion is specified,
  35. it is particularly efficient since no copy need be done
  36. .lp +15 15
  37. cbs=\fIn\fR    conversion buffer size
  38. .lp +15 15
  39. skip=\fIn\fR    skip \fIn\fR input records before starting copy
  40. .lp +15 15
  41. count=\fIn\fR    copy only \fIn\fR input records
  42. .lp +15 15
  43. conv=ascii    convert EBCDIC to ASCII
  44. .lp +15 10
  45. ebcdic    convert ASCII to EBCDIC
  46. .lp +15 10
  47. lcase    map alphabetics to lower case
  48. .lp +15 10
  49. ucase    map alphabetics to upper case
  50. .lp +15 10
  51. swab    swap every pair of bytes
  52. .lp +15 10
  53. noerror    do not stop processing on an error
  54. .lp +15 10
  55. sync    pad every input record to \fIibs\fR
  56. .lp +15 10
  57. .li
  58. ... , ...    several comma-separated conversions
  59. .i0
  60. .s3
  61. .fi
  62. Where sizes are specified,
  63. a number of bytes is expected.
  64. A number may end with
  65. .bd "k, b"
  66. or
  67. .bd w
  68. to specify multiplication by
  69. 1024, 512, or 2 respectively.
  70. Also a pair of numbers may be separated by
  71. .bd x
  72. to indicate a product.
  73. .s3
  74. .it Cbs
  75. is used only if
  76. .it ascii
  77. or
  78. .it ebcdic
  79. conversion is specified.
  80. In the former case
  81. .it cbs
  82. characters are placed into the conversion buffer, converted to
  83. ASCII, and trailing blanks trimmed and new-line added
  84. before sending the line to the output.
  85. In the latter case ASCII characters are read into the
  86. conversion buffer, converted to EBCDIC, and blanks added
  87. to make up an
  88. output record of size
  89. .it cbs.
  90. .s3
  91. After completion,
  92. .it dd
  93. reports the number of whole and partial input and output
  94. blocks.
  95. .s3
  96. For example, to read an EBCDIC tape blocked ten 80-byte
  97. EBCDIC card images per record into the ASCII file
  98. .it x:
  99. .s3
  100. dd  if=/dev/rmt0  of=x  ibs=800  cbs=80  conv=ascii,lcase
  101. .s3
  102. Note the use of raw magtape.
  103. .it Dd
  104. is especially suited to I/O on the raw
  105. physical devices because it allows reading
  106. and writing in arbitrary record sizes.
  107. .sh "SEE ALSO"
  108. cp (I)
  109. .sh BUGS
  110. The ASCII/EBCDIC conversion tables are
  111. taken
  112. from the 256 character standard in
  113. the CACM Nov, 1968.
  114. It is not clear how this relates to real life.
  115. .s3
  116. Newlines are inserted only on conversion to ASCII;
  117. padding is done only on conversion to EBCDIC.
  118. There should be separate options.
  119.