Copying Files [ New Features of MPE/iX: Using the Hierarchical File System ] MPE/iX 5.0 Documentation
New Features of MPE/iX: Using the Hierarchical File System
Copying Files
You can use the COPY command to copy any MPE/iX files. If you are
granted sufficient access, you can copy files outside your current logon
account.
You can also copy files to and from directories by using HFS syntax with
COPY. Files named using HFS syntax must begin with (.) or (/). Remember
that HFS syntax is case sensitive.
If you copy a file that has an ACD assigned to it, the ACD is copied
along with the file. You can change the ACD on the copied file so it has
the ACD you want by using the ALTSEC command. Refer to the ALTSEC
command in the MPE/iX Commands Reference Manual, Vol. I (32650- 90003).
If you copy a file that has no ACD into an HFS directory, the file is
automatically assigned an ACD. By default, the ACD assigned is RACD:@.@
(read ACD access for all users on the system).
NOTE The default ACD assigned when copying files into an HFS directory
may not match the original file's access matrix. You may want to
use the ALTSEC command to change the ACD of the copied file to set
up the desired security provisions on the file.
The TO= parameter of the COPY command has always allowed .GROUP to be
specified as a shortcut for sourcefile.GROUP. To remain consistent, a
leading (.) in the TO= parameter only is not interpreted as an HFS name.
Table 7-4 summarizes file security changes that occur at the file
level when you copy files on MPE/iX.
Table 7-4. Resulting Security When Copying Files
-----------------------------------------------------------------------------------------------
| | | |
| From | To | Resulting Security1, 2 |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| FILE1.GROUP1.ACCT1 | FILE2.GROUP1.ACCT1 | Same as original file |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| FILE1.GROUP1.ACCT1 | FILE2.GROUP2.ACCT13 | If FILE1 has no ACD, the |
| | | copied file takes on the |
| | | security assigned to GROUP2. |
| | | If FILE1 has an ACD, it is |
| | | copied to FILE2. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| FILE1.GROUP1.ACCT1 | FILE2.GROUP2.ACCT23 | If FILE1 has no ACD, the file |
| | | security matrix remains the |
| | | same. Note that the group |
| | | security may be different for |
| | | GROUP2. If FILE1 has an ACD, |
| | | FILE2 is assigned the same |
| | | ACD. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| FILE1.GROUP1.ACCT1 | /ACCT1/GROUP1/dir1/file2 3 | If FILE1 has no ACD, an ACD is |
| | | assigned (usually RACD:@.@). |
| | | If FILE1 has an ACD, file2 is |
| | | assigned the same ACD. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| /ACCT1/GROUP1/dir1/file1 | /ACCT1/GROUP1/dir2/file2 3 | Same (original file has an ACD |
| | | that is the same as that of |
| | | the copied file) |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| /ACCT1/GROUP1/dir1/file1 | /ACCT2/GROUP2/dir2/file2 3 | Same (original file has an ACD |
| | | that is the same as that of |
| | | the renamed file) |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| /file1 | /file2 | Same (original file has an ACD |
| | | that is the same as that of |
| | | the copied file) |
| | | |
-----------------------------------------------------------------------------------------------
| |
| |
| 1. The copied file takes on the GID of the parent directory and the UID of the |
| person doing the copy. |
| |
| 2. The ACD may not change on the copied file, but the way it is evaluated may |
| change if the UID and/or the GID of the file changes and the ACD has a $OWNER |
| or $GROUP entry, respectively. |
| |
| 3. To access a file, you need TD entries access. So some users previously able to |
| access the file may not be able to access the file in the new location. |
| |
-----------------------------------------------------------------------------------------------
Copying a file from an account to a directory
To copy a file from an account to a directory:
* Use the COPY command. For example:
:COPY LETTER.PUB.SYS, ./xfer
The file named LETTER.PUB.SYS is copied to xfer in the current working
directory. The file xfer will only be recognized in lowercase. If you
try to list it using LISTFILE xfer, MPE/iX displays an error
(Non-existent file). To list it, you need to specify HFS syntax:
:LISTFILE ./xfer
PATH= /SYS/PUB/
./xfer
Copying a file from a directory to an account
To copy a file from a directory to an account:
* Use the COPY command:
:COPY ./xfer, LETTER.PUB.ACCT
The file named xfer (in lowercase) in the current working directory is
copied to LETTER.CUB.ACCT (in uppercase) in the current account.
Copying a file from one directory to another
To copy a file from a directory to a second directory:
* Use the COPY command:
:COPY /dir0/file1,/dir1/file2
The file file1 in dir0 in the root directory is copied to file2 in dir1
also in the root directory. These files are in directories outside of
accounts and groups.
MPE/iX 5.0 Documentation