[SparForte][Banner]
[Top Main Menu] Intro | Tutorials | Reference | Packages | Examples | Contributors   [Back Page]      [Next Page]  

Current Directory

There are two built-in shell commands for managing your current directory:

pwd

Display the path of the present (also called "current") working directory.

Bash equivalent: pwd
Perl equivalent: Cwd::getcwd
PHP equivalent: getcwd
 

cd

Change the present working directory. The tilde, '~', represents your home directory. The variable PWD will be set with the path of the current working directory. The variable OLDPWD will be set to the previous value of PWD. The minus sign, '-', represents your previous directory. The cd command ignores the value of a CDPATH variable.

Example

=> pwd
/home/ken/ada/bush/doc
=> cd ../src
=> pwd
/home/ken/ada/bush/src
=> cd -
/home/ken/ada/bush/doc
=> cd ~/src
=> pwd
/home/ken/src

Bash equivalent: cd
Perl equivalent: chdir
PHP equivalent: chdir
 
[Right Submenu]

 AdaScript versus GCC

 Case Sensitivity

 Reserved Words

 Comments

 Literals

 Bourne Shell Word Expansions

 Fundamental Types

 User-defined Types

 Enumerated Types

 Arrays

 Records

 Basic Assignment

 The @ and % Operands

 Command Argument Shortcuts

 Redirection and Pipelines

 Command Line Interaction

 Built-in Shell Commands

 The Current Directory

 Database Commands

 Flow of Control

 Other Statements/ Subprograms

 External Commands

 Block Statements and Subprograms

 TCP/IP Sockets

 Numeric Formatting with Put

 Interpreter Directives

 Command Line Options

 Command Reference

 ASCII and Latin_1 Character Sets

 Common Error Messages

 Common PHP Functions and the SparForte Equivalent

[Back to Top] Back To Top [Small Forte Symbol]