### 34.6 Current Working Directory

— Command: cd dir
— Command: chdir dir

> Change the current working directory to dir. If dir is omitted, the current directory is changed to the users home directory. For example,

>               cd ~/octave

> Changes the current working directory to `~/octave`. If the directory does not exist, an error message is printed and the working directory is not changed.

— Command: ls options

> List directory contents. For example,

>               ls -l
>                    -| total 12
>                    -| -rw-r--r--   1 jwe  users  4488 Aug 19 04:02 foo.m
>                    -| -rw-r--r--   1 jwe  users  1315 Aug 17 23:14 bar.m

> The `dir` and `ls` commands are implemented by calling your system's directory listing command, so the available options may vary from system to system.

— Built-in Function: pwd ()

> Return the current working directory.