KEMBAR78
Unit 5 MS Dos | PDF | Computer File | Unix
0% found this document useful (0 votes)
118 views10 pages

Unit 5 MS Dos

The document discusses MS-DOS and various commands used in DOS and Windows command line interfaces. It describes commands to manage files and directories like COPY, DEL, DIR, TREE, CD, MD, RD, REN, TYPE and attributes. It also covers commands for date, time, clearing screen and exiting. Wildcard characters, batch files, history of Unix operating system are also summarized along with examples.

Uploaded by

Tapan Rana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
118 views10 pages

Unit 5 MS Dos

The document discusses MS-DOS and various commands used in DOS and Windows command line interfaces. It describes commands to manage files and directories like COPY, DEL, DIR, TREE, CD, MD, RD, REN, TYPE and attributes. It also covers commands for date, time, clearing screen and exiting. Wildcard characters, batch files, history of Unix operating system are also summarized along with examples.

Uploaded by

Tapan Rana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

UNIT 5 Operating System Commands, Editors, Filters

 Introduction to MS DOS
o Microsoft Disk Operating System, MS-DOS is a non-graphical command line operating
system created for IBM compatible computers.
o MS-DOS was first introduced by Microsoft in August 1981 and was last updated in 1994
with MS-DOS 6.22.
o Window command shell commonly known as the Windows command line is still widely
used.

Command
o Command is a sequence of characters which tells the computer what to do.
o When one types commands to a computer, one is conversing with the operating system's
command interpreter.

Files:
o A file is a collection of Records.
o Any document created using computer is a file.
o This document could either be a letter, any excel sheet, any image or even a database.

Directory / Folder:
o A collection of files is directory (in DOS) or folder (in Windows).

 Types of Command
Internal Commands:
o Internal Commands are located in memory and do not require and further disk access
when they are used.
o Examples: COPY, DEL, DIR, VER, TYPE, TIME, CD, DATE, CLS

External Commands:
o An external command is an MS-DOS command that is not included in memory.
o They reside on the DOS disk and require a disk access to be used.
o Example: CHKDSK, FORMAT, DISKCOPY, APPEND, ASSIGN

 DOS Commands
DIR:
o DIR Shows directory information such as name, size, and the date and time stamp of files.
o Syntax: DIR [drive][path]

MANAGEMENT INFORMATION SYSTEM CMPICA PAGE 1


UNIT 5 Operating System Commands, Editors, Filters

o Optional switches
o /p- Display dir info and pauses display when the screen is full
o /w -Display names and extensions only.
Example:

TREE:
o Show directory structure in tree format.
o Syntax: TREE [path]
o /f: display name of files in each folder
Example:

CD: Change Directory

MANAGEMENT INFORMATION SYSTEM CMPICA PAGE 2


UNIT 5 Operating System Commands, Editors, Filters

o This command lets you change directories.


o Syntax: CD [path][dirname]
o Use CD.. To move back on previous directory
o Use CD / to move directly to back to root drive.
Example

MD and MKDIR: Make Directory


o This lets you Make a Directory.
o You type MD followed by a file name. You can nest (Make a directory within a directory) up
to 16 directories on most DOS only systems
o Syntax: - MD [DRIVE:] PATH or MKDIR [DRIVE:] PATH
Example

RD and RMDIR: Remove Directory


o RD will remove a Directory.
o Use RD followed by the name of the directory you wish to delete.
o You must empty the directory first or you will just get an error message from DOS.
o Syntax: - RD [DRIVE:] PATH or RMDIR [DRIVE:] PATH
Example

COPY CON: Copy CONSOL


o COPY CON is used to copying information from keyboard in particular file.
o This command is used to create a file directly from DOS.
o Syntax: - COPY CON FIENAME.EXTENSION
o This will allow user to create and write some data in file.
o Press Ctrl + z to come out from edit mode and save file.
Example

REN: RENAME
MANAGEMENT INFORMATION SYSTEM CMPICA PAGE 3
UNIT 5 Operating System Commands, Editors, Filters

o REN command is used to rename the existing file only.


o This command is used in such situation when any wrong file name has been entered or
user wants to change the filename for some security purposes.
o Syntax: - C:\>REN OLDFILENAME.EXTENSION NEWFILENAME.EXTENSION
Example

TYPE:
o This command will display the contents of a text file on screen.
o Syntax: TYPE [d:][path][name.ext]
Example

COPY:
o COPY Copies a file from one location to another.
o It does not remove the source file after writing the new file
o Syntax: COPY [d:][path][name.ext] [d:][path][name.ext]

DEL:
o Deletes a file from disk.
o Syntax: - DEL [DRIVE:][PATH] FILENAME
o /p : Prompts for confirmation before deleting each file

ATTRIB:
o Change or view the attributes of files
o Syntax: - ATTRIB [+R|-R] [+A|-A] [+S|-S] [+H|- H][drive:][path][filename] [/S]
o /s : Processes matching files in the current folder and all subfolders.
Example:
Add attribute read only and hidden to a file named practice.docx

Remove above given attributes

MOVE:

MANAGEMENT INFORMATION SYSTEM CMPICA PAGE 4


UNIT 5 Operating System Commands, Editors, Filters

o MOVE command is used to move file/s from one directory to another directory.
o Syntax: - MOVE [DRIVE:] [PATH] FILENAME DESTINATION
Example

TIME:
o TIME Displays current time and allows it to be changed.
o Syntax: TIME [/t]
o If only time command is passed it will show the current time and also it will give an option
to change the time.

o If the time command is written with /t option than it will just show the current time.

DATE:
o Displays current date and allows it to be changed.
o If you don’t want to change date, then just press enter when it asks for new date.
o Syntax: DATE
Example

CLS:
o Clears all the content on screen.
o Syntax: CLS

Exit:
o The command is used to exit the command prompt.
o Syntax: exit

Help:

MANAGEMENT INFORMATION SYSTEM CMPICA PAGE 5


UNIT 5 Operating System Commands, Editors, Filters

o It will show all the details about the command including the syntax and explanation for the
syntax.
o Syntax: Help [Command name]
Example

VER:
o VER will tell you what version of DOS you are using.
o Syntax: - VER
Example

 Wildcard Characters
o Wildcards are characters that can be used to stand-in for unknown characters in file
names.
o In DOS, wildcard characters can match up with any character that is allowable in a file
name.
o Wild cards are symbols that let you reference groups of related files.
o There are two wildcards in DOS:
o First wildcard character is “ * “ which matches up with any combination of allowable
characters .
Example:
o C:\> del *.doc = This command would delete every file with the doc extension
from C: drive.
o C:\> copy ab*.txt d: = This command would copy every file that began with ab, and had an
extension of txt, to the local drive D: like abcd.txt, abHello.txt.
o Second wildcard character is “ ? “ which matches up with any single allowable character.
Types of wild cards
Example:

MANAGEMENT INFORMATION SYSTEM CMPICA PAGE 6


UNIT 5 Operating System Commands, Editors, Filters

o C:\> del ?.doc = This command would delete every file with single letter name and the doc
extension from C: drive.
o C:\> copy ab?.txt d: = This command would copy every file with three-character name,
began with ab, and had an extension of txt, to the local drive D: like abc.txt, abs.txt
o One can combine these wildcards in any command as well.
o C:\> del *ab?.doc

 Batch File
o A batch file is a kind of script file in DOS and Microsoft Windows.
o It consists of a series of commands to be executed by the command-line interpreter, stored
in a plain text file
o A batch file is a file that contains a number of DOS commands, each of which could be run
individually from the command prompt.
o By putting them into a batch file, they can be run as a group by simply running the batch
file.
o Note that the commands execute in the order they appear in the batch file.
o You create a batch file by using an ASCII text editor, such as DOS or Windows Notepad.
o File extension of batch file is .bat .
o Note that you must not use a name that is the same as any DOS commands or any other
program or utility you are likely to run.
o Create new file in Notepad , type below script and save with .bat extension.
Or
o Open cmd and type command copy con <filename>.bat , write below script and save it
using Ctrl + z.
echo Hello World
pause
cd test
Echo welcome in new directory!!!

To execute batch file:


o Type batch file name and press enter.
o The echo command is used for printing line on screen.
o To stop showing the execution of echo statement the command echo off can be used in
batch file.
o It should be written as “@echo off” before using the echo command.

MANAGEMENT INFORMATION SYSTEM CMPICA PAGE 7


UNIT 5 Operating System Commands, Editors, Filters

Example

mkdir MAIN
cd MAIN
mkdir LEFT RIGHT
cd LEFT
mkdir COMPUTER MCA M.SC.(IT) cd COMPUTER
mkdir "INPUT DEVICE" "OUTPUT DEVICE"
cd "INPUT DEVICE"
copy con Keyboard.txt
cd..
cd "OUTPUT DEVICE"
copy con Monitor.txt
cd..
cd..
cd MCA
mkdir ICT C
cd..
cd M.SC.(IT)
mkdir "OPERATING SYSTEM" "DBMS"
cd "OPERATING SYSTEM"
copy con OS.doc
cd..
cd DBMS
copy con DBMS.doc
cd..
cd..
cd..
cd RIGHT
copy con One.txt
copy con Two.txt
MANAGEMENT INFORMATION SYSTEM CMPICA PAGE 8
UNIT 5 Operating System Commands, Editors, Filters

 History of Unix
o Unix is considered as the mother of most of the operating systems.
o Unix is an Operating System which is truly the base of all Operating Systems like Linux,
Ubuntu, Solaris, POSIX etc.
o It was developed in the 1970s by Ken Thompson, Dennis Ritchie, and others in the AT&T
Laboratories.
o It was originally meant for programmers developing software.
o Unix is considered as the mother of most of the operating systems.
o Unix is an Operating System which is truly the base of all Operating Systems like Linux,
Ubuntu, Solaris, POSIX etc.
o It was developed in the 1970s by Ken Thompson, Dennis Ritchie, and others in the AT&T
Laboratories.
o It was originally meant for programmers developing software.

 Unix Architecture
Hardware:
o This refers to the Hardware layer of any system.
Kernel:
o It is the heart of the operating system and acts as an interface between user and hardware.
It also performs the tasks like memory management, file management, scheduling, power
management etc.
Shell:
o This acts as an interface between user and the kernel. When user types in the terminal,
shell interprets the command and calls the program that user wants. It uses the standard
syntax for all commands.
Commands:
o There are different kind of commands which are used in day to day life. cp, cat and ls are
commands which are used to perform operations on UNIX.
User:
o Communicates with Shell through Commands.
Files and Directories:
o In UNIX, all the data is organized into files. All files are organized into directories. These
directories are organized into a tree-like structure called the file system.
o The below diagram shows the architecture,

MANAGEMENT INFORMATION SYSTEM CMPICA PAGE 9


UNIT 5 Operating System Commands, Editors, Filters

 Main features of Unix


o Multi-user: More than one user can use the system at once which are supported via
terminals
o Multi-tasking: More than one program can run at the same time and can be worked upon
simultaneously.
o Hierarchical Directory Structure: All the files and folders are organized and maintained.
o Portability: It is only for one kernel and less than 10% code written in assembler.
o There are various tools available for the development.
o There are wide range of supportive tools which can be used like debuggers and compilers.

MANAGEMENT INFORMATION SYSTEM CMPICA PAGE 10

You might also like