Vous êtes sur la page 1sur 10

Assignment

Comparison of Unix and Dos

Submitted By Submitted To Class

Abbas Siddique Sir Nazim Ud din MPA (2nd)

Quaid-i-Azam University Islamabad

DOS ( Disk Operating System)


DOS (Disk Operating System) was the first widely-installed operating system for personal computers. (Earlier, the same name had been used for an IBM operating system for a line of business computers.) The first personal computer version of DOS, called PC-DOS, was developed for IBM by Bill Gates and his new Microsoft Corporation. He retained the rights to market a Microsoft version, called MS-DOS PC-DOS and MS-DOS are almost identical and most users have referred to either of them as just "DOS." DOS was (and still is) a non-graphical line-oriented commandor menu-driven operating system, with a relatively simple interface but not overly "friendly" user interface. Its prompt to enter a command looks like this: C:> The first Microsoft Windows operating system was really an application that ran on top of the MS-DOS operating system. Today, Windows operating systems continue to support DOS (or a DOS-like user interface) for special purposes by emulating the operating system. In the 1970s before the personal computer was invented, IBM had a different and unrelated DOS (Disk Operating System) that ran on smaller business computers. It was replaced by IBM's VSE operating system.

UNIX
UNIX is a powerful computer operating system originally developed at AT&T Bell Laboratories. It is very popular among the scientific, engineering, and academic communities due to its multi-user and multi-tasking environment, flexibility and portability, electronic mail and networking capabilities, and the numerous programming, text processing and scientific utilities available. It has also gained widespread acceptance in government and business. Over the years, two major forms (with several vendors variants of each) of UNIX have evolved: AT&T UNIX System V and the University of California at Berkeleys Berkeley Software Distribution (BSD). This document will be based on the SunOS 4.1.3_U1, Suns combination of BSD UNIX (BSD versions 4.2 and 4.3) and System V

because it is the primary version of UNIX available at Rice. Also available are Solaris, a System Vbased version, and IRIX, used by Silicon Graphics machin.

The Structure of DOS


The structure of Disk Operating System for IBM PC-compatible computers can be broken down into four distinct components:

BIOS Module Kernel Command Processor External Commands

The BIOS Module


The BIOS module includes the default resident drivers for:

Console display and keyboard (CON) Line printer (PRN) Auxiliary device (AUX) Date and time (CLOCK) Boot disk device (block device)

It also accomodates installable drivers (DEVICE=commands in CONFIG.SYS), such as:


MOUSE.SYS ANSI.SYS 386EMM.SYS CLOCK.SYS, etc.

The primitive parts of the resident drivers are in the ROM BIOS while the rest are in the IO.SYS (or IBMBIO.COM) system file.

The DOS Kernel


The DOS Kernel performs the following functions:

File and record management Memory management Character device input/output Spawning other programs Access to real-time clock.

The DOS kernel components are contained in the MSDOS.SYS (or IBMDOS.COM) system file. Programs communicate with the kernel via software interrupts.

The Command Processor


The command processor is also known as the shell, or the command interpreter. The command processor is not the operating system, but rather a special class of program running under control of MS-DOS - it is the user interface to DOS. The command processor is responsible for parsing and carrying out user commands, including the loading and execution of other programs from disk (external commands). The command processor also includes the code for many of the most commonly-used DOS commands, known as the internal commands. Five standard handles defined by MS-DOS for COMMAND.COM

Standard input CON Standard output CON Standard error CON Auxiliary AUX List device PRN

The DOS External Commands


The external commands are known as disk bound commands. They reside in individual files on disk and must be loaded executed. into primary memory (RAM) before they can be

Structure of UNIX
The Directory Structure
All the files are grouped together in the directory structure. The file-system is arranged in a hierarchical structure, like an inverted tree. The top of the hierarchy is traditionally called root (written as a slash / )

In the diagram above, we see that the home directory of the undergraduate student "ee51vn" contains two sub-directories (docs and pics) and a file called report.doc. The full path to the file report.doc is "/home/its/ug1/ee51vn/report.doc"

Comparison between UNIX and MS-DOS


UNIX and MS-DOS have much in common, primarily because MS-DOS was partly developed using ideas from UNIX. Here are some of the major differences:

UNIX filenames are arbitrary strings of up to 255 characters, MS-DOS filenames are limited to an 8 character file name and a 3 character file type, and have restrictions on allowable characters.

UNIX doesn't require the notion of a disk drive modifier for a file specification, i.e., you don't need A:, B:, C:, and so on like MS-DOS. Note that MS-DOS has the JOIN command which can simulate the UNIX file system.

UNIX uses forward slashes (/) to separate directories in a file specification, whereas MSDOS uses backslashes ( ).

UNIX is a full multiuser multitasking operating system, whereas MS-DOS is a singleuser OS without concepts like file-ownership and process priorities. UNIX has a richer command set than MS-DOS. UNIX and MS-DOS both have the concept of a PATH. UNIX and MS-DOS both have pipes and I/O redirection. UNIX displays characters on your terminal as you type them, regardless of whether the operating system is ready to accept a command. MS-DOS will buffer, but not display, terminal input when it is busy executing the previous command.

1. UNIX vs DOS: Differences


Number of Users DOS is Single-User, UNIX is Multi-User Task Processing DOS is Single Process, UNIX supports multi-processing, multiple processes per user, and job control from the shell Command-Line Interface DOS has its command interpreter (command.com). UNIX has the shell (C-shell, Korn Shell, Bourne Shell etc.) Security Some versions of DOS allow password protection on file. UNIX has username/password for logins, and user/group/world permissions on files and directories. Portability DOS runs on Intel processors and compatible devices (8088, 8086, 286, 386, 486, Pentium). UNIX is available for a very wide variety of hardware platforms. Shell-Level Programming DOS has batch files. UNIX has shell scripts.

Keyboard Operations
Action UNIX stty DOS

Alternative to Enter

Ctrl-J or Ctrl-M

Retrieve last command

Esc-K from vi

F3

Clear Screen

Ctrl-L

Backspace: Erase last character typed

Ctrl-H or #

Backspace key

Kill all the way back to the prompt (without executing it)

@ or Ctrl-U or Ctrl-X

Ctrl-C

Stop

Ctrl-Z or q

Exit / End of file

Ctrl-D

Ctrl-Z

Scroll forward

spacebar

Scroll back

up arrow

Stop scrolling

Ctrl-S

Resume scrolling

Ctrl-Q

Ctrl-Q

Swap Command line to KDE

Alt+F8

Swap KDE to Command line

Ctrl+Alt+F1

Command Comparison:
DOS Command DIR UNIX or Bash Command ls -l (or use ls -lF)(-a all files) (df -k Space remaining on filesystem) ls -tr ls -ls ls -R ls -a ls -R cd mkdir ln rmdir pwd rm -iv rm -R cp -piv cp -R mv -iv cat more man clear ctrl-l exit exit 0 grep diff Action List directory contents List directory contents by reverse time of modification/creation. List files and size List directory/sub-directory contents recursively. List hidden files. List directory recursivly Change directory Make a new directory Create a file or directory link Remove a directory Display directory location Remove a file Remove all directories and files below given directory Copy a file Copy all file of directory recursivly Rename/move a file Dump contents of a file to users screen Pipe output a single page at a time Online manuals Clear screen Exit a shell Look for a word in files given in command line Compare two files and show differences. Also see comm, cmp,

DIR *.* /o-d DIR *.* /v /os DIR /s DIR /aa

TREE CD MKDIR MD ASSIGN RMDIR RD CHDIR DEL ERASE RMDIR /S (NT) DELTREE (Win 95...) COPY XCOPY RENAME or MOVE TYPE MORE HELP or COMMAND /? CLS EXIT EXIT0 FIND FINDSTR COMP

mgdiff and tkdiff. FC SET SET variable=value echo %variable% diff set and env set export variable=value echo $variable ECHO text SET variable echo text setenv (for C shell) or export VAR=val (for Korn shell. Also VAR=val) Echo text to screen Set environment variables Display search path for executables. Set PATH environment variable. Set user command prompt. Show date. (also set date - DOS only) List command history Set command alias Trap ctrl-break / Trap signals. Sort data alphabetically/numerically Line mode editor Edit a file. The Linux editor which looks most like DOS edit is probably Pico. (Not a recomendation!) Save files to floppy. See Using DOS floppies Read files from floppy. See Using DOS floppies Change file permissions. DOS: +:set to -:remove r:Read only a:Archive s:System /s:recursively Change file to a hidden file - rename file with prefix "." Print a file Compare two files and show differences. Also see comm, cmp, mgdiff and tkdiff. List all environment variables Set environment variables Show environment variables

PATH echo $PATH PATH %PATH%;C:\DIR PATH=$PATH:/dir PROMPT $p$g DATE or TIME DOSKEY /h DOSKEY NAME=command BREAK ON SORT EDLIN EDIT filename.txt export PS1='\h(\u)\W> ' date history alias NAME=command trap sort ed pico, gnp, vi, xedit, xemacs,dtpad tar -cvf /dev/fd0 files mdir, mcopy doswrite -a file (AIX only) tar -xvf /dev/fd0 files mdir, mcopy dosread -a file (AIX only) chmod mv file .file lpr

BACKUP files A:\

RESTORE A:\ files ATTRIB [+r|-r] [+a|-a] [+s|-s] [path\file] /s ATTRIB +h or h PRINT

Vous aimerez peut-être aussi