Professional Documents
Culture Documents
In the single user operating system only one user can access the
system and system’s resources at a time.
Ex: DOS
In the multi user operating system multiple users can access the
system and system’s resources at a time.
Ex: WINDOWS, UNIX etc.
1
2
The UNIX operating system was first developed in the late 1960’s
at AT & T Bell Laboratories. The code for the same was originally written in the
Assembly language on the PDP-7 and was consequently machine dependent.
The second version of UNIX was moved to a more advanced
PDP-II computer. For an operating system to prosper it had to be portable and had to
work efficiently on diverse hardware platforms. For the same reasons, the whole UNIX
kernel was recorded in the C language by Dennis Ritchie at the Bell Laboratories in 1973.
Further research on UNIX was conducted by the University of
California at Berkeley and a version called the BSD(Berkeley Software Division) version
of UNIX was released by 1960 UNIX could virtually be ported onto any computer with
power to support it.
In the mid-eighties a corporation called Santa Cruz Operation Inc.
took the lead in developing a version of UNIX for the Intel 80286/80386 family. Today
you can buy versions of UNIX for all the computers ranging from the largest super
computers to the present day micro computers.
Hardware Requirements:-
2
3
the status of reservations. This kind of situation where many tasks are processed by the
processor at the same time is known as multi tasking environment.
2.Multi-user Capability:-
3.Portability:-
The UNIX system has been made portable for almost every size of
computer everbuilt. UNIX system can now be used even on powerful micro computers.
The UNIX system provides the environment that allows for easy portability of
applications between micro computers and main frames. Portability has 3 aspects.
1. The system itself can be easily installed on different machines totally varying
architectures. This is possible as almost 90% of UNIX system is written in
machine independent C language and about 10% is written in machine
dependent assembly language.
2. Data on one system can be transferred to another.
3. Application programs written for one system work on another system with
little or no modifications.
4.Communications:-
5.Security:-
The users data is highly secure in the UNIX operating system than
that in any operating system. There are several levels of security in UNIX. The first level
is system security. The standard login procedure before UNIX starts running on the
system ensures that not just anybody can start running UNIX on your system.
3
4
4
5
hardware
The shell is a mediator between the user and the UNIX system. It is
also called as the command interpretor. It accepts commands from the user and executes
it and gives the result to the user. UNIX provides different number of shells. The shells
provided by the UNIX are
Login:-
5
6
When your terminal or personal computer are turned on, you can
see a login prompt in the following manner.
Login:
Once you see the prompt, type your user or login name exactly as
well as been assigned to you by the system administrator, matching upper and lower case
letters. Since UNIX is case sensitive, the login name TTYP0 is different from ttyp0 or
Ttyp0.
Password:-
To keep unauthorised people away from UNIX account, you are required
to enter a password before you login to your account. You can login after entering
your login name and pressing return, you will see the password prompt as follows
Password:
Now type your password again exactly as well as it has been assigned to
you so that the password cann’t be read by other users, since it doesn’t appear on the
screen as you typed it. Some accounts, usually public accounts to be used by the
number of users doesn’t need password. If your account is public, you will not see
the password prompt and can ignore the instructions regarding passwords. If you
have typed both login and password correctly, you will be logged into your account.
Root Directory(/)
6
7
The bin directory consists of all the executable files related to the
UNIX commands. By default all the commands which you can use in the UNIX
environment are external commands. There must be an executable file for each command.
The tmp directory consists of all the temporary files to work with
UNIX environment.
The dev directory consists of all the device drivers files which will
be used to control different types of devices, terminals etc.
The etc directory consists of all files related to the passwords of the
users.
1.Owner:-
The owner is the user who has initially created the file.
2.Group:-
3.Others:-
All other users of the UNIX system other than the owner and the
group people are called as others.
1.Read Permission:-
A user who has read permission for a file can look at the contents
of the file. A user who has read permission for a directory can find out what files are
7
8
there in the directory. To read the directory the user must have the execute permission.
Whether the user can see the contents of the file in the directory depends on the read
permission for the files themselves in addition to the read and execute permission for the
directory.
2.Write Permission:-
A user who has write permission for a file can change the contents
of that file. A user who has write permission for a directory can change the contents of
the directory. You can create new files and remove existing files. Whether you can
change the contents of existing file in the directory depends on the write permission for
the files themselves.
3.Execute Permission:-
A user who has execute permission for a file can use the filename
as a UNIX system command. A user who has execute permission for a directory can
change to that directory and can copy the files from that directory provided you can also
have the read permission for that directory.
Changing permissions:-
drw-rw-rw-
These 10 letters word denote the permissions. The first letter tells
about the nature of the file. If it is ‘d’ it is actually a directory. If it is ‘-‘, it is an ordinary
file. The rest of the 9 letters can be split into words of 3 letters each. The first three letters
tells you about the owner’s permissions, the second about the group permissions and the
third about the others permissions. It consists of letters “rwx” in that order some of them
being replaced by ‘-‘. If r is present, then one can read the file. A ’-‘ in its place indicates
that reading permission is denied. A ‘w’ denotes writing permission and ‘x’ denotes the
execute permission. In total 8 possibilities occur which are denoted by the number
between 0 to 7 .
--- 0+0+0=0
--x 0+0+1=1
-w- 0+2+0=2
-wx 0+2+1=3
r-- 4+0+0=4
r-x 4+0+1=5
rw- 4+2+0=6
rwx 4+2+1=7
8
9
Commands:-
1.Banner:-
2.Cal:-
This command prints a calendar for the specified year. If the month
is also specified, a calendar for that month only is printed. If no arguments are specified,
the current, previous and next month calendar are printed along with the current date and
time. The year must be a number between 1 to 9999, month number is a number between
1 and 12 or you can specify enough characters to specify a particular month.
Ex:- $ cal
$ cal 2001
$ cal 4 2000
$ cal sep 2002
3.Date:-
This command prints and sets the current system date and time.
The UNIX system maintains an internal clock meant to run perpetually. This is possible
because when the system is shut down, a battery backup keeps the clock ticking. This is
possible because when the system is shut down, a battery backup keeps the clock ticking.
This clock actually stores the number of seconds elapsed since January 1,1970.
Ex:- $date
9
10
For example you can print only the month using the format +%m
4.Echo:-
5.bc:-
Ex:- $bc
12+5
17
ctrl+d
$
The output is shown in the next line. To come out from the
calculator press ctrl+d.Then $ prompt will be displayed.
Home directory:-
10
11
Your home directory is the directory you are placed in when you
login to your UNIX account. This directory has the same name as your login name. Every
time you login, UNIX setup a variable called home that identifies your home directory.
$ echo $home
cd:-
Syn:- cd directoryname
Ex:- $ cd office
Mkdir:-
-p - If you specify this option mkdir creates a directory by creating all non
existent parent directories.
-m mode- It allows you to set a diferent permission mode for the directory when you
create it.
Rmdir:-
11
12
Like mkdir, rmdir also can delete one or more directories at a time.
Ls:-
Ex:- $ ls
Ex:- $ ls –l
Cat:-
Cat is one of the most well known commands of the UNIX system.
It is mainly used to display the contents of a file on the terminal.
cp:-
12
13
Cp directory1 directory2
The first syntax copies one file to another file. The second syntax
copies a file or group of files into a directory. The cp command copies a copy of a file
with a new name or to a different directory and leaves the original file as it is.
Mv:-
Cmp:-
This command compares two files, if the files are same, it returns
no output. If the files are different, it returns the line number and byte position of the first
difference. Only two files may be compared at a time.
-l - prints the byte number and the different bytes for each difference.
Filter commands:-
Head:-
This command takes a file as the standard input and gives first few
lines as output.
13
14
tail:-
This command takes a file as the standard input and gives last few
lines as output.
By default tail prints the last 10 lines of the input as output. If you
specify the count, tail prints last count number of lines as output. You can change this by
specifying the distance from the beginning or end of the file, at which tail is to start. A
number following a + indicates the distance from the beginning.
paste:-
Communication commands:-
Mesg:-
Syn:- mesg [n | y]
14
15
Ex:- mesg
$ mesg n
$ mesg y
write:-
The write command copies lines from your terminal to that of any
other user. When first called, it sends the message “Message from your logname your tty
…”. The recepient of the message should wait for message. You can type your message
and press ctrl+d to terminate the message. At this pont, it dispalys as “(end of message)”
and sends the message to another terminal.
To terminate the message, press ctrl+d for end of file and coming
out of the message window to $ prompt or press ctrl+o to interrupt the command right in
the middle.
Talk:-
To the user to whom you wish to talk. At this point the recepient of
the message should reply by typing.
15
16
Talk yourname@yourmachine
16
17
Conclusion:-
17
18
Bibliography
18
19
2 History Of UNIX
2
3 Hardware Requirements
2
4 Features Of UNIX
2-4
5 Structure Of UNIX
5
9 UNIX Commands
9-16
10 Conclusion
17
Bibliography 18
19