Hitachi

JP1 Version 11 JP1/Advanced Shell Description, User's Guide, Reference, and Operator's Guide 


8.4.23 mv command (moves files or directories)

Syntax

mv [-f] [-i] [-u]source destination
mv [-f] [-i] [-u]source ... destination-directory

Description

This command moves files or directories. It can also change the names of files or directories.

Arguments

-f

--force

This command overwrites the path without verifying the path. This command is ignored if this command is specified before the -i option.

-i

--interactive

This command enables you to confirm overwriting. If you reply y or Y from the standard input, the path is overwritten. This command is ignored if this command is specified before the -f option.

-u

--update

If the destination file already exists and the last modification date and time are the same as or later than those of the source while you attempt to move a file other than directory, file is not moved. The last modified date and time of a file is determined upon rounding off values smaller than a second.

source

This command specifies the name of the path to be moved. Multiple path names can be specified for the source.

destination

This command specifies the name of the path of the destination. If you specify the path name for source and destination, you can change the file name or directory name.

destination-directory

This command specifies the directory of destination. If you specify multiple path names for the source, you can move multiple files and directories.

Return codes

Return code

Meaning

0

Normal termination

1 or greater

Error termination

Notes

Examples