Vous êtes sur la page 1sur 4

INTRODUCTION TO UNIX

THE UNIX OPERATING SYSTEM

Background
UNIX had a modest beginning at AT and T Bell Laboratories during the late
Sixtes. It was primarily developed to pursue “programming research”. Until UNIX came
on the scene, operating systems were designed with a particular machine in mind.
Similarly, computers were built for specific operating systems. They were invariably
written in assembler which understood and accessed the hardware well and had good
speed. In those days, hardware was expensive and human labour comparatively cheap.
Later, hardware prices started coming down sharply and labour costs started shooting up.
The focus shifted to improvement of the environment of the software designer. The
founder of UNIX T.R.(Thompson & Ritchie) took the important decision to trade off
speed against utility and portability. UNIX was developed with the idea of porting to any
hardware. Originally written in assembly language, UNIX was rewritten in 1973 using
the C language.

CONCEPT

In the Unix operating system everything is represented with a file. We mean everything
like your documents floppy and hard disks monitor keyboard etc. all are represented by a
file to put it simply a file is structured to store information.

A process is an instance of a running program. A Process is said to be born when the


program starts execution and remains alive as long as the program active. After execution
is complete. The processes cease to exist and is said to die.

Portability— applications in one platform can be ported to another platform easily

Multi-user operation---many users can use the system at the same time

Device independence----can work on a variety of hardware platforms

Hierarchical file system---this is characteristic about which we will learn in detail later.

Filters, redirections, pipes and tree-------various utilities, about which we learn later on.

Multitasking-----we can do more than one task like rating e-mail and compiling programs
at the same time

Basic command for UNIX

1) LS [ directory]----list of files
2) Pwd----name of current directory

3) Jobs—lists jobs running in current shell

4)ps-ux--- last of all processes you are running

5) man command name---gives cryptic Unix when notes

6) cat find name---print the file content on screen

7)more fine name---print the content of a fine to the screen. Stopping at the bottom of
each page so you can read that file. Uses space bar to continue queue to quite.
8) Head - n file name---show the first n line of a file.
9 )tail – n file name---show the last n lines of a file
10 )lpr file Name – sends a file to line printer
11)lpq ---list the print queue
12)lprm jon # --- to remove the job from the print queue
13)cp file name 1 directory/filename 2 ---copy file to adirectory.
14)mv file name 1 directory/[file name 2]---moves a file.use also for renaming

15 rm file name---deletes the file system


16)mkdir directory—to create a folder or directory.
17 rm dir directory --- remove directory.
18finger user name --- check to see if some one is logged on
19 ch mod code file name –sets protection levels, needed to make a script executable.
20history ---list the last commans used
21xterm---opens a new xprienter
Induction to dos

Definition

Dos stands for disk operating system .ms-dos stand for Microsoft disk operating system
named after the developer of the operating system, Microsoft corporation USA

Operating system
An operating system is a collection of programs that manages system resources and aids
in the execution of application program the operating system acts as an interface between
the user and the computer

DOS commands

Dos commands are used to communicate with the computer dos commands are of two
types, internal and external

Internal commands reside in a portion of the computer’s memory as soon as dos gets
loaded and are always available to the user .COMMAND.COM is one of the operating
system program that gets loaded into computer memory during the machine startup and
reside in the memory. there are certain dos commands stored with COMMAND.COM.
These commands are referred as internal dos commands.

Example
Internal commands

Mkdir, chdir, copy, cls, path, del.

External commands are of a loaded from the disk into the memory, before they can be
executed.
These are the commands which exist as separate program files and reside on the disk.

Example
External commands
Tree, xcopy, diskcopy, more, move, format etc

Internal commands.

Copy
Syntax: copy [d:][path]<source filename >[d:][path]<target filename
Example: c:\>copy c: chapter2 c2
Type
Syntax: c:\>del<filename>
Example: c:\>type chap1

Erase/del
Syntax: c:\>del<filename>
Example:del a:c2

Path
Syntax: c:\>path =[d]
Example: c:\>path = c:\windows ;\foxpro;

Md/mkdir
Syntax: c:\>md<derectory name>
Example: c:\>md test

Cd/chdir
Syntax: c:\>cd<directory name>
Example: c:\>cd test

Rd/rmdir
Syntax: c:\>rd<directory>
Example: c:\>rd test

External commands

More
Syntax: c:\>more<file name>
Example: c:\>more test.txt

Deltree
Syntax: c:\>deltree<directory name>
Example: c:\>deltree new

Move
Syntax: c:\>move [source directory][target directory]
Example: c:\>move c:\mydir\*.* c:\newdir

Undelete
Syntax c:\>undelete <file name>
Example: c:\>undelete newdir

Vous aimerez peut-être aussi