Name

msmv — Move (rename) MSS files.

Synopsis

msmv [-project proj] [-f] [-period ret_period] (1) password options file1 file2

msmv [-project proj] [-f] [-period ret_period] (1) password options directory1 directory2

msmv [-project proj] [-f] [-period ret_period] (1) password options path [path...] directory


(1) [-rpwd read_password] [-wpwd write_password] [-newr read_password] [-neww write_password]

Description

In the first synopsis form, msmv moves file1 to file2.

In the second synopsis form, msmv move all MSS files contained within the directory1 tree into directory2. Note that because the MSS does not have persistent directories, this will cause multiple of individual move operations to take place. This could require a lengthy period of time to complete if the directory contains many files.

In the third synopsis form, msmv moves each MSS file (or directory) named by a path operand to a destination MSS file (or directory) in the target directory named by the directory operand. Note that due to the way the MSS manages directories, the target directory need not exist prior to the move. The destination path for each MSS file (or directory) will be the concatenation of the target directory, a single slash character, and the last pathname component of path.

If the source MSS file or directory is within the /trash directory, that MSS file or directory will be recovered as described in the msrecover man page.

Note

If the source MSS file and destination MSS file are the same MSS file (identical names), msmv will issue an error message and will not perform the move. This means that it is not possible to use msmv to set a password or retention period without renaming the MSS file at the same time. You must use mspasswd(1NCAR) or msretention(1NCAR) instead.

Warning

The destination pathname does not undergo wildcard (file pattern) expansion.

Options

Msmv specific options:

-p[roject] proj

Supply proj as the project number for charging. Currently, no charging is done for metadata operations, so this option is a placeholder for when charging might be imposed.

Note

This will not change the project number used for storage charges.
-f

Force the move if a MSS file with the destination pathname exists. A trash MSS file will be created for the destination MSS file that gets replaced. Normally msmv will fail if the destination MSS file exists. If msmv is being used to recover a MSS file or directory, the recovery will always fail if a MSS file or directory exists with the same pathname as the destination, even if the -f option is specified.

-pe[riod] ret_period

Sets the retention period to ret_period (in days) for the MSS files.

The common password related options are:

-rpwd password

Supply the read password for the following MSS files. If another read password was specified prior to this point in this command line, and the following MSS files do no have a read password, a null password must be given: -rpwd ''. If the MSS files do not have a read password, this option must not be used.

-wpwd password

Supply the write password for the following MSS files. If another write password was specified prior to this point in this command line, and the following MSS files do no have a write password, a null password must be given: -wpwd ''. If the MSS files do not have a write password, this option must not be used.

-newr password

Supply the new read password for the following MSS files. If another new read password was specified prior to this point in this command line, and you do not want a new password set for the following MSS files, a null password must be given: -newr ''. If you want to turn off an existing read password, you must use: -newr OFF.

-neww password

Supply the new write password for the following MSS files. If another new write password was specified prior to this point in this command line, and you do not want a new password set for the following MSS files, a null password must be given: -neww ''. If you want to turn off an existing write password, you must use: -neww OFF.

Operands

directory

A pathname of a directory to simulate renaming by moving all files contained within the directory tree. Can also be the target of a move of one or more MSS files or directories.

file

A pathname of an MSS file to be renamed.

path

A pathname of either an MSS file or directory.

Examples

Example 22. Rename an MSS file.

This example renames the MSS file from ocean/data/JAN96 to ocean/data/MAR96:

msmv ocean/data/JAN96 ocean/data/MAR96


Example 23. Rename an MSS file that has passwords.

The following example renames the file CLOWN (with old read and write passwords) to the new name BOZO and removes the read password at the same time:

msmv -rpwd oldpwd -wpwd wrtpw -newr OFF CLOWN BOZO


Example 24. Move an MSS file into a non-existent directory.

This example moves an MSS file ocean/data/JAN96 into a directory NEWDATA and gives the MSS file the resulting name of NEWDATA/0196:

msmv ocean/data/JAN96 NEWDATA/0196


Environment Variables

See Environment Variables section of the Command Behavior and Envrionment chapter for details.

Exit Status

See Exit Status Codes section of the Command Behavior and Environment chapter for details.

See Also

mschproj(1NCAR), mspasswd(1NCAR), msrecover(1NCAR), msretention(1NCAR), msrm(1NCAR)

Copyright

2008 University Corporation for Atmospheric Research, all rights reserved.