7.2.10 mv
Rename files.
Syntax
mv [{ -w | --wallet } wallet-location ] [{ -T | --trace } trace-level ]
source1 target1 [ sourceN targetN ]...
Command Options
The options for the mv
command are:
-
source1-N: Specifies the source file being moved.
-
target1-N: Specifies the target location of the file. The value cannot be a directory.
-
-w
,--wallet
: Optionally specifies the path to the Exascale wallet directory. -
-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
Usage Notes
Note the following information when using this command:
-
The source and target locations must reside in the same Exascale vault.
-
You can use a wildcard (
%
) in the source location to specify multiple source files, in which case the corresponding target location must also contain a matching wildcard. For example, see Example 7-15.
Examples
Example 7-15 Move Multiple Files on Exascale Storage
The following example uses the wildcard character (%
) to move
multiple files from @MYDATA/location1/prefix1%
to
@MYDATA/location2/anotherlocation/prefix2%
. Using the example command, a
file named @MYDATA/location1/prefix1mydata
would be moved to
@MYDATA/location2/anotherlocation/prefix2mydata
.
$ xsh mv @MYDATA/location1/prefix1% @MYDATA/location2/anotherlocation/prefix2%
Parent topic: XSH Command Reference