home *** CD-ROM | disk | FTP | other *** search
-
- dd
- --
- Documentation for version 1.1, on June 30th, 1992
-
- by Bruno Costa
-
-
-
- WARNING
-
- Although this program is freely distributable (see COPYRIGHT below), I
- would appreciate if you take the time to write me a line or two (E-Mail
- please) if you are using any of my programs or if you have any kind of
- ideas or suggestions (This is not too much to ask, is it?). If you feel
- particularly generous, I would like to receive a disk with any useful
- programs you have written, preferrably with source. Thanks!
-
-
- DESCRIPTION
-
- dd is an utility similar to Unix's dd. It allows you to read or write
- data blocks from any device supported by AmigaDOS. It is fully system
- friendly, and uses many features of Workbench 2.0 (which is required, by
- the way). dd will copy the data it reads/writes from/to a device to/from a
- normal AmigaDOS file in any other device. It can be used to backup a
- device image to another device (like reading a whole partition of a hard
- disk to the serial port or to a magnetic tape) and later restore, or to
- test for media errors or recover whatever data is readable from an invalid
- AmigaDOS device. It will also print all the information on a given device
- available from the operating system.
-
-
- OPTIONS
-
- usage: dd [-q] [-c<count>] [-s<skip>] -i<dev>|-r<dev>|-w<dev> <file>
- -q = quiet operation
- -c = amount to be read
- -s = amount to be skipped before reading (relative to start of disk)
- -i = just print OS information on given device and exit
- -r = device to read data from
- -w = device to write data to
- -h = help (this message)
-
- dd requires one of the following three options that define the operating
- modes to be present:
-
- i = just print all the information available from the operating system
- (both dos and exec) on the given device.
-
- r = read data from the given device and write it to the file <file>.
-
- w = write data to the given device that is read from file <file>.
-
- In the read and write modes, dd will print to the standard output an
- increasing count of blocks processed so far (over the total). This beaviour
- can be changed with the following option:
-
- q = suppresses any non-essential messages.
-
- In both read and write modes, the amount of data that will be read or
- written and the position in the device where the operation should start can
- be set with the following options:
-
- c = (count) set the amount of data that should be read/written.
-
- s = (skip) set the amount that should be skipped in the device before
- reading or writing the real data (defaults to 0).
-
- Both of the amounts above can be followed by an optional unit specifier,
- which can be any of the following:
-
- B: blocks (this is the default unit)
- s: sectors
- b: bytes
- k: kilobytes (kilo = 1024)
- M: megabytes (mega = 1024*1024)
-
- Note that a sector means usually just a single block, but it can be any
- integral number of blocks.
-
-
- EXAMPLES
-
- To read the boot blocks of the floppy in drive 0 to the file foo:
-
- > dd -rdf0: -c2 foo
-
- To copy the disk in df0: to df1: (using a true pipe):
-
- > run dd -rdf0: -c1760 -q PIPE:ddtmp
- > dd -wdf1: -c1760 PIPE:ddtmp
-
- To read all the data blocks from a 720k MS-DOS disk:
-
- > dd -rdi0: -c1426 -s14 data ; using CrossDOS
- > dd -rdf0: -c1426 -s14 data ; using MultiDOS
- > dd -rmd0: -c1426 -s14 data ; using MessyDOS (???)
-
- To see how many blocks your hard drive partition DH0: uses:
-
- >dd -idh0:
- |AmigaDOS information on device `dh0:':
- | Boot Priority: 0
- | Filesystem: 0x444F5301
- | Block size: 128 longwords
- | Sectors per Block: 1
- | Blocks per track: 70
- | Number of heads: 1
- | Interleave: 0
- | Starting cylinder: 237
- | Ending cylinder: 1280
- |Blocks reserved at start: 2
- | Blocks reserved at end: 0
- | Number of buffers: 30
- | Memory Type for Buffers: 0x0
- | Max bytes transferred: 16777215
- | Address Mask: 0xFFFFFFFC
- |
- |Exec information on device `scsi.device' (unit 6 with flags 0x0):
- | Device Version: 37
- | Device Revision: 19
- | Device Driver ID: scsidisk 37.19 (10.5.91)
- |
- | (Further information not available)
-
- Since each cylinder contains as many tracks as there are heads, in this
- case the partition sizes are as follows:
-
- size in cylinders = 1280 - 237 + 1 = 1044 cylinders
- size in tracks = 1044 * 1 = 1044 tracks
- size in blocks = 1044 * 70 = 73080 blocks
- size in bytes = 73080 * 128 = 9354240 longwords = 37.416.960 bytes
-
- The number of blocks in the device before the partition starts are:
-
- start = (237 - 1) * 1 * 70 = 16520
-
- To backup the above partition to a magnetic tape device (tape:):
-
- > dd -rdh0 -c73080 -s16520 tape:
-
- To read the volume label from an 880k Amiga floppy:
-
- > dd -s450992b -c1b -rdf0: size
- > type size hex
- | 0000: 0C ; the label is 0x0C = 12 chars in lenght
- > dd -s450993b -c12b -rdf0: label
- > type label
- | Workbench2.0 ; its the Workbench disk!
-
- Now you have a sophysticated -- but practical and easy-to-use -- way to
- know the label of a floppy disk (no need to look at the worbench screen or
- type the info command anymore! ;-).
-
-
- BUGS
-
- It should be possible to read either from a device or file and write to
- any other device or file orthogonally, i.e., it should be possible to read
- from a device and write directly to another, or from a file to another
- (useless, but consistent).
-
- There should be a couple of extra unit specifiers, like tracks and
- cylinders.
-
-
- AUTHOR
-
- The accompanying program and this documentation were written by Bruno
- Costa. He can be reached in the following ways:
-
- E-Mail: bruno@impa.br (InterNet)
- bruno@BRLNCC.bitnet (BitNet)
-
- Mail: Bruno Costa
- Rua Almirante Guilhem 454/102 bloco 1
- Leblon - Rio de Janeiro
- RJ 22440
- BRAZIL
-
-
- COPYRIGHT
-
- This program is copyrighted by Bruno Costa. It may be freely distributed
- if and only if the documentation and the executables are provided in
- original form. It may be included in Public Domain/Shareware compilations,
- like the one organized by Fred Fish, as long as just a nominal fee is
- charged for each disk (no more than US$10 per disk), and may also be
- uploaded to BBS's or network services like BIX and CompuServe.
-
-
- DISCLAIMER
-
- The author makes no warranty of any kind with respect to this product and
- explicitly disclaims any implied warranties of merchantability or fitness
- for any particular purpose.
-