7.2.7 dd
Convert and copy a file residing in Exascale or a local file system.
Syntax
dd [ --if=name ] [ --of=name ] [ --bs=bytes ] [ --count=num ]
[ --ibs=bytes ] [ --obs=bytes ] [ --seek=num ] [ --skip=num ]
[ --imirror=num ] [ --omirror=num ] [ --mirror=num ]
[ --truncate ] [ --aio=naio ] [ --block ]
[ --status=status-level] [ --sparse ]
[{ -w | --wallet } wallet-location ]
[{ -T | --trace } trace-level ]
[{ -j | --json } [ --compact ]]
Command Options
The options for the
dd
command are:
-
--if
: Specifies the name of the input file to use instead of standard input. -
--of
: Specifies the name of the output file to use instead of standard output. -
--bs
: Specifies the number of bytes to read and write in each block. The default value is512
. -
--count
: Specifies the number of input blocks. -
--ibs
: Specifies the number of bytes to read in each block. The default value is512
. -
--obs
: Specifies the number of bytes to write in each block. The default value is512
. -
--seek
: Specifies the number of blocks to skip at the start of the output. -
--skip
: Specifies the number of blocks to skip at the start of the input. -
--imirror
: Specifies the input mirror number. The first mirror is0
, the second mirror is1
, and so on. The default value is255
, which means 'read any mirror.' -
--omirror
: Specifies the output mirror number. The first mirror is0
, the second mirror is1
, and so on. The default value is255
, which means 'write all mirrors.' -
--mirror
: Specifies the input and output mirror number. The first mirror is0
, the second mirror is1
, and so on. The default value is255
, which means 'all mirrors.' -
--truncate
Resizes the output file. -
--aio
: Specifies the number of asynchronous I/O channels used to process the command. Asynchronous I/O enables the command to initiate I/O operations and continue executing other tasks without waiting (blocking) for the I/Os to complete. The default value is 4, which generally provides an optimal balance of performance and resource utilization. -
--block
: Specifies that the I/O offsets should be divisible by the relevant I/O block size. -
--status
: Specifies the level of status information output during a long-running operation.Permitted values are:
-
progress
: Periodically shows progress statistics. -
none
: Suppresses progress statistics and only shows applicable error messages. This is the default setting.
-
-
--sparse
: Performs the operation in a sparse-aware manner by skipping read and write I/Os for empty source file blocks (blocks containing all zeros) and generating sparse output files.This option only applies when copying files in Exascale storage.
-
-w
,--wallet
: Optionally specifies the path to the Exascale wallet directory. -
-T
,--trace
: Optionally enables tracing, with the trace level (trace-level) set to1
(minimum tracing),2
(medium tracing), or3
(maximum tracing). If the trace level is not specified, then minimum tracing is enabled by default.The trace file is written to the first accessible location in the following list:
-
If the
$ADR_BASE
environment variable is set:$ADR_BASE/diag/EXC/xsh_<user-name>/<host-name>/trace/xsh_<date>.trc
/var/log/oracle/diag/EXC/xsh_<user-name>/<host-name>/trace/xsh_<date>.trc
/tmp/diag/EXC/xsh_<user-name>/<host-name>/trace/xsh_<date>.trc
-
-
-j
,--json
: Displays the output in JSON format. -
--compact
: Displays JSON formatted output in a compact format, without white space and line breaks.
Examples
Example 7-16 Copy a Specific Portion of an Exascale File
This example demonstrates how to copy a specific section of an Exascale file to a local file. This type of command is valuable for extracting or examining a portion of a large file without copying the entire file.
Using a 16 KB (16,384 bytes) block size, the command skips the first 160 KB (10 blocks) of the Exascale file at @my-data/dbs/t_cf1.f
, and then copies the next 32 KB (2 blocks) to the local file at /tmp/16K.file
.
$ xsh dd --if=@my-data/dbs/t_cf1.f --of=/tmp/16K.file --bs=16384 --skip=10 --count=2
Parent topic: XSH Command Reference