Modernization Hub

CD

Change Directory
Enhanced Definition

In the context of IBM z/OS, `CD` (Change Directory) is a fundamental command used within the Unix System Services (USS) environment to alter the current working directory. It enables users and scripts to navigate the hierarchical file system (HFS or zFS) to access specific files and subdirectories.

Key Characteristics

    • USS Command: CD is a standard POSIX-compliant command available in the z/OS Unix System Services shell (e.g., OMVS, bash via SSH), providing a familiar Unix-like interface on the mainframe.
    • File System Navigation: It allows users to move between directories within the z/OS hierarchical file system, which can be implemented using either HFS (Hierarchical File System) or zFS (z/OS File System).
    • Path Support: Supports both absolute pathnames (starting from the root /) and relative pathnames (relative to the current directory), along with special notations like . (current directory) and .. (parent directory).
    • Session Specific: Changes made to the current working directory using CD are specific to the current shell session or process and do not affect other concurrent sessions or processes on the system.
    • Environment Variable: The current working directory is typically maintained by the shell in the PWD environment variable, which can be displayed using the pwd (print working directory) command.

Use Cases

    • Script Execution: Changing to a specific directory before executing a shell script or a program that expects to find its resources or input files in the current working directory.
    • File Management: Navigating to directories containing application configuration files, log files, or data files for viewing, editing, or general manipulation.
    • **

Related Vendors

IBM

646 products

NETEC International

4 products

Attunity

4 products

Broadcom

235 products

Levi, Ray & Shoup

22 products

Related Categories

Printing and Output

158 products

Abend

17 products

CICS

214 products

Databases

211 products

Data Management

117 products