Table of Contents

unix Keyword 1

Data Streams (STDIN, STDOUT, STDERR)

Definition

Data Streams:

The location information is sent to form your computer.

References

unix Keyword 1 Phase 2

Paths: Absolute and Relative

Definition

Paths specify the unique location of a file or directory by showing the root and the hierarchy of directories in which the file resides. For example, in the Lab46 file system, the path to get to the games directory is from the Lab46 root, to the user directory, followed by the games directory. This path would be written as “lab46:/usr/games”.

Paths may be absolute or relative. An absolute path is a path that points to the same file location in a file system regardless of the current, or working, directory (where the user currently is). A relative path is a path that points to the file location but is dependent on the working directory.

Examples:

/a/b/c/d is an absolute path, as it specifies the full location for the directory/file “d”.

Using the above example, if the user is currently in the /c directory, he/she could use /d as a relative path to get to d. However, if the user is currently in the /a or /b directories, typing /d will not direct him/her to d.

References

Demonstration

Demonstration of the indicated keyword.

lab46:~$ /src/hello   (absolute path)
lab46:~$ cd /src
lab46:~/src$ ./hello  (relative path)