Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)
mv(1) OSS Shell and Utilities Reference Manual
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.Ifafile 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.
6. To use mv with pattern-matching characters, enter:
mv dir1/* .
This moves all files in the directory dir1 into the current directory (.), giving them the
same names they had in dir1. This also empties dir1. Note that you must type a space
between the * (asterisk) and the . (dot).
7. To move all OSS files on the local node to a remote node, enter:
mv -W NOG -W NOE / /E/node
where node is the Expand node name of the target remote node.
6−28 Hewlett-Packard Company 527188-007