Scroll to navigation

SDD(1E) Schily´s USER COMMANDS SDD(1E)

NAME

sdd - disk dump and restore to and from tape or file; copy and/or reblock

SYNOPSIS

sdd [ option=value ] [ -flag ]

DESCRIPTION

sdd copies the specified input file to a specified output file performing the requested conversions. The standard input and output are used by default. The input and output block size may be specified to take advantage of raw physical I/O.

After completion, sdd reports the number of whole records, the sum of bytes from partial input and output blocks and the total amount in kilo bytes on input and output.

If ibs and obs differ, sdd is faster than dd due to the use of an intelligent algorithm.

OPTIONS

Print a summary of the available options.
Input is taken from file name; default is stdin.

If sdd is installed suid root, name may be in remote syntax: user@host:filename as in rcp(1) even if invoked by non root users. See SUID NOTES for more information.

To make a file local although it includes a colon (:), the filename must start with: '/', './' or '../'

Output is taken from file name; default is stdout. Note that sdd creates and truncates the output file by default; therefore the oseek=# option is useless without the -notrunc option except in special cases such as using magnetic tape or disk special files.

If sdd is installed suid root, name may be in remote syntax: user@host:filename as in rcp(1) even if invoked by non root users.

Note that if sdd talks to an old rmt remote tape server, it does not open a remote file with the O_CREAT open flag because this would be extremely dangerous. If the rmt server on the other side is the rmt server that comes with star or the GNU rmt server, sdd may use the symbolic mode for the open flags. Only the symbolic open modes allow sending all possible open modes in a portable way to remote tape servers.

It is recommended to use the rmt server that comes with star. It is the only rmt server that gives platform independent compatibility with BSD, Sun and GNU rmt clients and it includes security features that may be set up in /etc/default/rmt.

Do not read input from file. This is similar to if=/dev/zero but much faster. sdd uses a prepared cleared buffer to satisfy writes.
Do not produce any output. This is similar to of=/dev/null but actually does not write to any file.
Set input block size, output block size or both to # (default 512 Bytes).
Set Conversion buffer size to #.
Set input volume size or output volume size to #. You can make copies from devices of different size by using this option. If you want to make a copy to a tape having a size of 60 MBytes you should use the option ovsize=60M. If the capacity of the tape is exceeded, sdd will ask for a second volume. In case ivsize is exceeded, if N<cr> is typed, it is treated as an EOF condition and sdd writes any buffered data to output and exits. In case ovsize is exceeded, if N<cr> is typed, sdd stops and the statistics it prints show that more data were read than written.
Transfer # of input records or until EOF.
Seek/skip the first # Bytes from input before beginning transfer.
Seek/skip the first # Bytes from output before beginning transfer.
Seek/skip the first # Bytes from input and output before beginning transfer.
Seek # Bytes from input/output at the beginning of each input/output volume before beginning transfer. (You can skip labels of disks and floppies with this option.) Note that the iseek/oseek options still work, but only apply to the first volume. Their values are added to the values of ivseek and ovseek.
Do not truncate an already existing output file before beginning transfer. This enables it to copy one file into another.
Print a dot to stderr each time a record is written to indicate progress.
Set the basic buffersize for error recovery via -noerror to #. The default is 512 to match the most usual physical sector size. Since error recovery is done at the level of the basic buffer size, you need to use this option in error recovery mode in case you are accessing a drive with a different physical sector size than 512 bytes.
Report the total time and the transfer rate.
Do not stop transfer on I/O errors. Error messages will appear on the screen. If this option is used and -noseek has not been specified as well, ibs and obs need to be multiples of the error recovery blocksize specified via secsize=#.
Do not write blocks that are not read correctly. Seek on the output to skip the bad block. The output file must be seekable or -noerrwrite will not work correctly.
Do not seek after I/O errors. This implies try=1.
Set retry count to #. Only if -noerror was specified. (default 2)
Turn on debugging messages. You can get knowledge about record sizes on tapes with variable record size with this option.
Pad every output record with zeros up to obs. If ibs equals obs, or only bs was specified, every record will be padded with zeros, otherwise this only applies to the last record.
Swaps bytes (except for the last byte in odd block sizes and odd transfers due to EOF).
Convert fixed length records to variable records and vice versa.
Map alphabetics to lower/upper case.
Convert EBCDIC to ASCII resp. ASCII to EBCDIC resp. ASCII to the IBM variant of EBCDIC.
Prints a short summary of the sdd options and exists.
Compute the md5 sum for the data. If the option -onull was used, sdd computes the md5 sum on the input data, otherwise the output data is used.
Specify a remote login program instead of defaulting to ssh(1). This can be overridden by the RSH environment variable.
Prints the sdd version number string and exists.

EXAMPLES

sdd if=/dev/rsd0a of=/dev/nrst8 bs=2x7x17b

Copies the disk /dev/rsd0a to the tape /dev/nrst8 using a record size of 2*7*17 blocks. (this is 2 Cylinders.)

sdd if=/dev/rsd0c of=/dev/rsd1c seek=1b bs=63k

Copy the whole disk sd0 to sd1 preserving the old label on disk sd1.

sdd if=user@remotehost:/dev/da0 of=/dev/ada1 bs=512 -pg

Copy the entire disk da0 on host remotehost as user user to the disk ada1 on the local host using a block size of 512 while printing a progress with dots. This command defaults to using ssh(1). If you want to use a different remote shell, either give sdd the rsh=prog option or set RSH to the desired shell program.

SEE ALSO

dd(1), star(1), rmt(1), tr(1), cp(1), copy(1)

DIAGNOSTICS

sdd: Read f records + p bytes (total of x bytes = d.nnk).
sdd: Wrote f records + p bytes (total of x bytes = d.nnk).

The number of full records, the number of bytes in partial records and the total amount of data in KBytes.

With the QUIT signal ( usually ^\ ) the actual state is displayed.

NOTES

Opposed to dd, sdd is able to handle -iseek -oseek -seek as well as -iskip -oskip -skip regardless to the buffer size. You can make a whole physical copy of a disk without copying the label in one pass of sdd.

When numbers are unspecified the are taken to be bytes.

You can make them `words' (2 bytes) if they are followed by a `w' or `W'.

You can make them blocks (512 bytes) if they are followed by a `b' or `B'.

You can make them Kbytes (1024 bytes) if they are followed by a `k' or `K'.

You can make them Mbytes (1024 * 1024 bytes) if they are followed by a `m' or `M'.

You can make them Gbytes (1024 * 1024 *1024 bytes) if they are followed by a `g' or `G'.

A pair of numbers may be separated by `*' or `x' to indicate a product.

SUID NOTES

If sdd is installed suid root, sdd is able to make connections to remote files for non root users. This is done by using the rcmd(3) interface to get a connection to a rmt(1) server. It defaults to using ssh(1) to establish the remote connection.

sdd resets its effective uid back to the real user id immediately after setting up the remote connection to the rmt server and before opening any other file.

BUGS

The option iskip=# and oskip=# and skip=# as well as -block and -unblock are not implemented.

It is confusing to allow the use of all additions together with the record counter -count as they are possible with obs=#.

Mail other bugs and suggestions to schilytools@mlists.in-berlin.de or open a ticket at https://codeberg.org/schilytools/schilytools/issues.

The mailing list archive may be found at:

https://mlists.in-berlin.de/mailman/listinfo/schilytools-mlists.in-berlin.de.

AUTHORS

Joerg Schilling and the schilytools project authors.

SOURCE DOWNLOAD

The source code for sdd is included in the schilytools project and may be retrieved from the schilytools project at Codeberg at

https://codeberg.org/schilytools/schilytools.

The download directory is

https://codeberg.org/schilytools/schilytools/releases.

2022/10/12 Joerg Schilling