Working With Directories [ HP ARPA File Transfer Protocol User's Guide ] MPE/iX 5.0 Express III Documentation
HP ARPA File Transfer Protocol User's Guide
Working With Directories
When a user logs on as USER.ACCT,GROUP, the current working directory is
initialized to /ACCT/GROUP. If a user creates a hierarchical directory
through the FTP/iX MKDIR DIR1 command and then changes to that directory
with the FTP/iX CD command, the new working directory will be
/ACCT/GROUP/DIR1. The current working directory can be identified with
the FTP/iX command PWD.
To change directories on the local system, use the FTP/iX LCD command.
The LCD command will automatically preface (./) to the given name if it
does not start with a dot or a slash. This command identifies the new
current directory.
To remove directories, use the FTP/iX rmdir command. The (./) is
prefaced to the given file name if it does not start with a dot or a
slash.
The rmdir will not work on MPE/iX groups or accounts. Likewise, mkdir
creates new directories, not groups or accounts.
Note that (.) refers to the current directory, (..) refers to the
directory above the current directory, and (/) is used as the separator
in the path name. Thus if a file name starts with (.) or (..), the path
traversed to find the file is relative to the current directory, whereas
if a file name starts with (/), the path is independent of the current
directory and refers to the absolute path name.
To change to a different directory outside of the FTP/iX subsystem in the
POSIX name space, use the CHDIR command.
Commands
CHDIR.
Changes the process's current working directory (CWD) on the local
system.
Syntax.
CHDIR [ [DIR=]dir_name] [;SHOW | NOSHOW]
Parameters.
dir_name The name of the new current directory (optional).
The dir_name is assumed to be an MPE/iX name.
HFS-named directories can be changed if dir_name
starts with a dot (.) or a slash (/). The
dir_name may not end in a slash and wild carding is
not allowed. If dir_name is omitted, your logon
directory is used. Your logon directory is your
logon group, in the form:
/LOGON_ACCOUNT/LOGON_GROUP
whereas if you need to change to a different MPE/iX
group name, use the CHGROUP command.
CHGROUP.
Switches you from the current group to another group within the logon
account to which you are allowed access (NM capability required). This
command is not executable through the FTP command prompt.
Syntax.
CHGROUP [ [GROUP=]groupnmae] [/grouppass]
Parameters.
groupname The name of the group to which you will be
switched. If you omit this parameter, you will be
switched to the home group.
grouppass The password of the group you are switching to, if
it is assigned a password. In a session, if the
target group has a password and you fail to supply
one on the command line, MPE/iX will prompt you to
enter one. You have three tries to enter the
correct password before the command fails.
In a batch job, if the target group has a password
and you fail to supply one, MPE/iX issues an error
message "INCORRECT PASSWORD (CIERR 1441)" and the
job fails.
In either case, when you switch to your home group,
you may omit the password.
Refer to the MPE/iX Commands Reference Manual (32050-60002) for command
syntax and usage.
Command Line (CI) Examples.
Example 1:
Table A-4.
-----------------------------------------------------------------
| | |
| :showme USER: | (NOT IN BREAK) |
| #S26,MANAGER.SYS,PUB | |
| | |
-----------------------------------------------------------------
| | |
| :showvar HPCWD HPCWD = | |
| /SYS/PUB | |
| | |
-----------------------------------------------------------------
Example 2:
Table A-5.
-----------------------------------------------------------------
| | |
| :showme USER: | (NOT IN BREAK) |
| #S26,MANAGER.SYS,PUB | |
| | |
-----------------------------------------------------------------
| |
| :showvar HPCWD HPCWD = /SYS/PUB |
| |
-----------------------------------------------------------------
| |
| :chgroup work |
| |
-----------------------------------------------------------------
| | |
| :showme USER: | (NOT IN BREAK) |
| #S36,MANAGER.SYS,WORK | |
| | |
-----------------------------------------------------------------
| |
| :showvar hpcwd HPCWD = /SYS/WORK |
| |
-----------------------------------------------------------------
Example 3:
Table A-6.
-----------------------------------------------------------------
| | |
| :showme USER: | (NOT IN BREAK) |
| #S26,MANAGER.SYS,PUB | |
| | |
-----------------------------------------------------------------
| | |
| :showvar HPCWD HPCWD = | |
| /SYS/PUB | |
| | |
-----------------------------------------------------------------
| | |
| :chdir /SYS/WORK CWD is | |
| "/SYS/WORK". | |
| | |
-----------------------------------------------------------------
| | |
| :SHOWME USER: | (NOT IN BREAK) |
| #S36,MANAGER.SYS,PUB | |
| | |
-----------------------------------------------------------------
| | |
| :showvar hpcwd HPCWD = | |
| /SYS/WORK | |
| | |
-----------------------------------------------------------------
FTP Usage Examples.
Example 1:
This is a sample of the operation of the POSIX current working directory
"cwd" and the resulting file domain on the local system. In this
example, the user on the local system, logged on as "MANAGER.SYS,PUB",
enters FTP and then executes a ":CHDIR /SYS/WORK" command. The result is
the local domain for files, FTP view will be "/SYS/WORK/" (POSIX syntax)
or "WORK.SYS" (MPE syntax).
Table A-7.
-----------------------------------------------------------------
| |
| :ftp.arpa.sys File Transfer Protocol [A0006018] (C) |
| Hewlett-Packard Co. 1990 |
| |
-----------------------------------------------------------------
| |
| ftp> :showvar HPCWD HPCWD = /SYS/PUB |
| |
-----------------------------------------------------------------
| | |
| ftp> :showme USER: | (NOT IN BREAK) |
| #S27,MANAGER.SYS,PUB | |
| | |
-----------------------------------------------------------------
| | |
| ftp> :chdir /SYS/WORK CWD is | |
| "/SYS/WORK". | |
| | |
-----------------------------------------------------------------
| | |
| ftp> :showvar HPCWD HPCWD = | |
| /SYS/WORK | |
| | |
-----------------------------------------------------------------
| | |
| ftp> :showme USER: | (IN PROGRAM) |
| #S27,MANAGER.SYS,PUB | |
| | |
-----------------------------------------------------------------
Example 2:
This is a sample of the operation of the POSIX current working directory
"cwd" and the resulting file domain on the remote system. In this
example, the user connects to the remote system with FTP, logged on as
"MANAGER.SYS,PUB" and then executes a FTP "cd /SYS/WORK" command. The
result is the remote domain for files FTP will view will be "/SYS/WORK"
(POSIX syntax) or "WORK.SYS" (MPE syntax).
Table A-8.
-----------------------------------------------------------
| | |
| ftp> pwd 257-"/SYS/PUB" is the current directory. | |
| 257 ",MANAGER.SYS,PUB" is the current session. | |
| | |
-----------------------------------------------------------
| | |
| ftp> cd /SYS/WORK 250 CWD file action successful. | |
| | |
-----------------------------------------------------------
| | |
| ftp> pwd 257-"/SYS/WORK" is the current directory. | |
| 257 ",MANAGER.SYS,PUB" is the current session. | |
| | |
-----------------------------------------------------------
MPE/iX 5.0 Express III Documentation