Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)

mv(1) OSS Shell and Utilities Reference Manual
The permissions used when an object is created by the mv command depend on the
value of the NFSPERMMAP attribute for the fileset on the system that contained the ori-
ginal file.
For more information about NFS and ACLs, see the acl(5) reference page.
Environment Variables
The following environment variables affect the execution of the mv command:
LC_MESSAGES
Determines the locales equivalent of y or n (for yes/no queries).
UTILSGE Specifies that HP extensions to the root directory should be omitted when the ini-
tial directory is root and a recursive operation occurs in an OSS shell command.
Application programs that test this variable might also honor its settings.
The UTILSGE value can be any of the following:
NOE Omit the /E directory.
NOG Omit the /G directory.
NOG:NOE Omit both the /G and /E directories.
The effect of assigning a value to UTILSGE environment variable is the same
as specifying the -W NOG or -W NOE flag in the command.
EXAMPLES
1. To rename a file, enter:
mv file1 file2
This renames file1 to file2. If a file named file2 already exists, its old contents are
replaced with those of file1.
2. To move a directory, enter:
mv dir1 dir2
This moves dir1 to dir2. It moves all files and directories under dir1 to the directory
named dir2, if the second directory exists. Otherwise, the directory dir1 gets renamed
dir2.
3. To move a file to another directory and give it a new name, enter:
mv file1 dir1/file2
This moves file1 to dir1/file2. The name file1 is removed from the current directory, and
the same file appears as file2 in the directory dir1.
4. To move a file to another directory, keeping the same name, enter:
mv file1 dir1
This moves file1 to dir1/file1.
5. To move several files into another directory, enter:
mv file1 dir1/file2 /u/dir2
This moves file1 to /u/dir2/file1 and dir1/file2 to /u/dir2/file2.
628 Hewlett-Packard Company 527188-021