Introduction to Data Communications
Previous 51c. Links, Instances & Processes Next

51c. Links, Instances & Processes

Links

Links are aliases that point to other files that can be on the same filing system (Unix) or across several filing systems. Linking a file is a cross between renaming the file and copying the file to your Home directory. When you link a file, you add a second name to the file, so that, to the operating system it looks like there are two files. A link is actually in a directory, like a file is, but whenever a program tries to get at the file the link represents, Unix sends the program to find the "real" file.

A Soft Link can span file systems (two different servers). If you delete the original file, you delete the Link.

A Hard Link is restricted to two items on the same file system (same server). If you delete either name, the original item is still there under the remaining name only.

You can use a link to shorten typing, linking a file with a long path name to your current directory. For example: if you want to run the file /usr/local/scripts/startup.ksh from your home directory without typing the entire name, you can create a link to it in your home directory called "Startup".

	ln -s  /usr/local/scripts/startup.ksh Startup

"ln" by itself is the command to create a hard link, the "-s" option makes it a soft link.

To delete a link, remove it the way you would an ordinary file using "rm". You are actually just removing the link, not the original file.


Instances & Processes

A process is an execution environment set up by the operating system kernel. A process consists of 3 major components:

Unix is a multi-tasking environment, this means that multiple processes can be run simultaneously. (sometimes processes are called sessions). If a program is being run by more than 1 user at a time, each process that is running the program is called an instance.

Example: If the E-mail reader program "pine" is run, it is considered a process under Unix. If another person runs "pine" at the same time, we say that there are 2 instances of "pine" being operated.

Processes are also called "jobs".


Introduction to Data Communications
Previous Table of Contents Next