The system function can return two values. The first is any output from the command that was written to the standard output stream, and the second is the output status of the command. You can find the values of environment variables using the function getenv . The functions clc , and home clear your terminal screen and move the cursor to the upper left corner. You can change the current working directory using the cd command.
Tilde expansion is performed on the path.
If the directory does not exist, an error message is printed and the working directory is not changed. The name chdir is an alias for cd . The command pwd prints the current working directory. The functions dir and ls list directory contents. 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.