Saturday, August 21, 2010

UNIX

History:
Unix was developed in 1969 at AT&T Bell Laboratories by Ken Thomson and Dennis Ritchie as a single user operating system in assembly language. The origin can be traced back to 1965, when a joint venture was undertaken by Bell Laboratories, General Electric Company and Massachusetts Institute of Technology known as MULTICS [Multiplex Information and Computing Service]. Later Unix was re-written in C in the year 1973.

The Unix filesystem:
In the Unix file system, the root [/] contains sub-directories viz. bin, boot, home, etc, user, dev and lib. In this system the Kernel resides on top of the hardware which provides the platform for Shell and Unix utilities and Application programs.

The various types of Unix Files are:
1. Ordinary or Regular Files [contains text, data or program information; not other files]
2. Directory Files [contains other directories or files; here each line comprises of two parts viz. the item name and the inode number(a pointer)]
3. Device or Special Files [physical devices as files; categorized into character special and block special files]
4. Symbolic Links [an indirect pointer to a file; categorized into hard link and soft link]

In Unix, the users can be categorized into various types according to their access control attributes. They are:
1.SuperUser
2.Owner
3.Group
4.Others

The various access attributes assigned to files or folders that provide the user some form of access control over the data are read[r], write[w] and execute[x].

Shells in Unix:
A Shell is nothing more than a command interpreter. In Unix, the shell is designed to be the interface to the user, to receive the user’s input(interpret commands) and act on them. The shell then sends the output to the default or a specialized location, usually the user’s terminal. There are some common Unix shells:

1. Bourne Shell: Unix shell program by Steve Bourne; “sh” or “/bin/sh”; has a “$” prompt.
2. Korn Shell: Newer variation of the shell program by David Korn; “ksh” or “/bin/ksh”.
3. C Shell: Commonly used shell by Bill Joy; has a “%” prompt; configured by *.rc and *.login files.
4. TC Shell: Variation of C Shell.
5. Bourne-Again Shell: Used in Linux; “bash”; has a “$” prompt; configured by *.bashrc file hidden in /home.

No comments: