| CRENAME Command |
|
All | |
| Purpose: |
Conditionally renames an existing file,by swapping attributes
with a replacement file. This command exists to assist with the administrative
problem of copying files from one media type to another, or from one class
of service (COS) to another, while preserving the owner,group id, account
ID, and modification times of the existing file.
If so, then:
The mandataory criteria are:
The optional criteria are:
|
| Aliases: | |
|
Command Format: |
cren[ame] [-d] [-ocos cosid[,cosid ...]] [-ncos cosid[,cosid ...]] new_path orig_path |
|
Options: |
-d : delete original file if the rename operation succeeds -ocos : Filter option. If specified, the Class of Service for "orig_path" must be one of the comma-separated COS IDs specified, or the command will fail. -ncos : Filter option. If specified, the Class of Service for "new_path" must be one of the comma-separated COS IDs specified, or the command will fail. |
|
Keywords: |
|
|
Usage Notes: |
|
|
Example: |
Create a copy of an existing file in Class of Service 22: cp cos=22 file.old file.new Conditionally rename the new file so that it replaces the existing file, while preserving timestamps,as well as owner, group and account IDs. file.new will only replace file.old if it was written to COS 22, and is exactly the same size as file.old: crename -ncos 22 file.new file.old |
|
Related Command(s): |