7.2.16 touch
Create a file or modify attributes of an existing file.
Syntax
touch [{ -w | --wallet } wallet-location ]
[ -s num | --size=num ]
[ -t ftype | --type=ftype ]
[ -r { true | false } | --read-only={ true | false }]
[{ -T | --trace } trace-level ] filename
Command Options
The options for the touch
command are:
-
filename: Specifies the file being created or modified.
-
-w
,--wallet
: Optionally specifies the path to the Exascale wallet directory. -
-s
,--size
: Optionally specifies the size of the file in bytes.The file size can be also specified using suffixes
K
,KB
,M
,MB
,G
,GB
,T
,TB
. The suffix is not case-sensitive. -
-t
,--ftype
: Optionally specifies the Oracle Database file type. The valid values are:ctrl
- control filedata
- data fileolog
- on-line log filealog
- archived log filetemp
- temporary sort fileinit
- initialization parameter filepswd
- password fileflog
- flashback log filectrk
- change tracking file
-
-r
,--read-only
: Optionally specifies that the file is read-only. When set totrue
, the file contents and metadata cannot be modified. -
-T
,--trace
: Optionally enables tracing and sets the trace level to1
(minimum tracing),2
(medium tracing), or3
(maximum tracing).If the
$ADR_BASE
environment variable is set, the trace file is written to:$ADR_BASE/diag/EXC/xsh_<username>/<hostname>/trace/xsh_<date>.trc
Otherwise, the trace file is written to:
/tmp/diag/EXC/xsh_<username>/<hostname>/trace/xsh_<date>.trc
Examples
Example 7-20 Create an Exascale file
Assuming that @DATA/myfile
does not already exist, the following example creates a 1 gigabyte file at @DATA/myfile
.
$ xsh touch --size=1G @DATA/myfile
If the file (@DATA/myfile
) already existed, the command would set the size of the preexisting file to 1 gigabyte.
Parent topic: XSH Command Reference