Sei sulla pagina 1di 6

Write – this command is used to send a file to desired user of LINUX

OS.
Syntax - write username < filename
Msg – this command is used to send message to any user.
Syntax - msg username
Type desired message then press Ctrl + D
Wall – this command is used to send desired message to all users.
Syntax
1) Wall <file name ex wall <notice
2) Wall (enter key), now type message then press Ctrl + D

wc – this command is used to count number of words, line and


characters in a file.
Syntax- wc <file name>

wc < fundamental (will show counting of chars, words, lines)


wc -c fundamental (will show counting of chars)
wc -n fundamental (will show counting of lines)
wc -w fundamental (will show counting of words)

grep – this command is used to search a word in a file.


Syntax – grep ‘word’ <filename>

grep ‘CPU’ fundamental (will show those lines which contain CPU)
grep -v ‘CPU’ fundamental (will show those lines which do not
contain CPU)
grep -n ‘CPU’ fundamental (Will show counting of the lines which
contain CPU)

vi – It is word processing program of LINUX. It is used to create,


edit, and save file.
syntax – vi <file name>

who – this command is used to see list of users with their login
time.
Syntax- who

who am I – this command show current user’s name and login time.
Syntax- who am i
What is Ms-Dos?
It stands for Microsoft disk operating system. It is a single user
and single tasking operating system. This operating system was
developed by Microsoft Company of USA in August 1981. It is
system software which manages the resources of a computer and
allows other application software to execute. It makes possible
easy operation of computer. Till now several versions of MS-Dos are
released. Among those versions MS-Dos 7.0 is latest. It works in
CUI (Command line user interface) mode.
Ms-Dos performs following works-
1) Processor management
2) File management
3) Input / Output management
4) Memory management
Booting – successful loading of the programs of operating system
from disk to primary memory is called booting. Whenever a
computer is turned on the programs of operating system gets
loaded from Hard disk to RAM. Successful completion of this work
is called booting. Booting requires following three files
1) Command.com
2) MsDos.sys
3) Io.sys
Command – An instruction for computer is called command.
There are two types of MS-Dos commands-
1) Internal commands
2) External commands
Internal commands – those commands which are part of the file
named command.com are called internal commands. This type of
commands of ms-dos are directly executed, they do not require any
additional file to execute. Examples of internal commands are date,
time, cls, copy, ver, vol etc

External commands – those commands which are not part of


command.com, which require extra files to execute are called
external commands. Such as Edit, Format, Xcopy, Move etc.

(What is LINUX? How it is organized?)


(What is MS_DOS? How it works)
Differences between LINUX and windows

Syntax – proper writing style of an instruction is called syntax.

Ms-dos prompt – (C :\>) after successful booting ms-dos shows a


symbol on the screen which is called ms-dos prompt. Ms-dos
prompt tells that now computer is ready to accept our instructions
and to work according to the instruction being given. After typing
instruction user will have to press enter key to get result of
instruction.
Date- this command shows current date and allows to change date.
Syntax- Date <new date>
C:\>Date
C:\>Date 12/07/2015
Time – this command shows current time and allows to change
time.
Syntax- time <new time>
C:\>Time
C:\> Time 11:20:30
Copy con – this command is used to make new file.
Syntax- Copy con <file name>
C:\> Copy con Theory
………..
………..
F6/ Ctrl + Z
Type – this command shows the contents of file.
Syntax- Type <file name>
C:\> Type theory

CLS – this command clears the screen of computer and moves


cursor to upper left corner of screen (first row).
Syntax- cls

Del/ Erase – this command is used is used to delete any unwanted


file.
Syntax- Del/Erase <file name> [/P]
C:\> Del theory
C:\> Del physics /p
Delete physics Yes/No?
/P – this option deletes file after confirmation

Ren/Rename – this command is used to change the name of a file.


Syntax-
Ren/Rename <old file name> <new file name>
C:\> Ren Book Notes
C:\> Ren notice Exam

Md/Mkdir – this command is used to make new directory.


Syntax- Md/Mkdir <directory/folder name>
C:\> Md Audio
C:\> Mkdir images

Cd/Chdir – this command is used to go to desired directory or


subdirectory.
Syntax- Cd/Chdir <directory name>
C:\> Cd Audio
C:\> Cd Images
Cd.. is used to go to parent directory.
Rd/Rmdir – this command is used to remove an empty directory.
Syntax- Rd/Rmdir <directory name>
C:\> Rd Audio

Tree – External, Tree.com


This command is used to see the directory structure of given
directory.
Syntax- Tree <directory name> [/F]
C:\>Tree work
Work
Exam
Account
C:\>Tree work /F
Exam
CBSE.txt
ICSE.txt
Accounts
Journal.txt
/F option shows list of files also.

Deltree – External , Deltree.exe


This command is used to delete files as well as directories. It is
able to delete those directories also which are not empty.
Syntax-
Deltree <directory name>/ <File name>
Deltree Work\Exam\CBSE.txt
Deltree Work\Accounts
Md Work
Cd Work
Copy con Notice
… F6
Macro – Shortcut of one or more commands of Ms-DOS is called
macro. It is used to execute set of instructions using a shortcut.
Syntax to declare a macro-
DOSKEY <macro name>=<commands>
DOSKEY D=DATE
Doskey x=Date $t Time
The macros define in Ms-Dos are temporary. They get deleted from
memory as soon as computer is turned off.

Batch file – a file which contains set of commands of Ms-Dos and


allows to execute those commands as a group called batch file.
The secondary name of a batch file is .BAT. It is used to make
permanent shortcut of commands.

Example
Copy con First.Bat
Date
Time
CLS
Dir /P
F6
First
Autoexec.bat – it is a special batch file of Ms-Dos which starts
execution as soon as computer is turned on. When a computer is
turned on the operating system gets loaded from disk to RAM then
Autoexec.bat automatically starts execution. We can by pass the
execution of Autoexec.bat by pressing F5 key
Differences between macro and batch file-
1. Macro is temporary shortcut of commands while
batch file is permanent shortcut of commands
2. macro executes faster than batch file
3. commands of a macro are separated by $T while
commands of a batch file are separated by Enter
key
4. More than one commands can be written on a line
while using macro but a batch file contains only
one command on a line

Device Driver – A small software which makes any hardware able to


work is called device driver.

Config.sys – it is a special file for ms-dos based computers. It stores


a set of commands which are to be executed at the time when
computer is turned on. It is used to give initial configuration of
computer. It is used to specify the number of files to be opened at a
time, the size of data buffer. It is also used to load any device driver
at the time when computer is turned on. The config.sys file gets
executed automatically it does not require any special instruction
to execute. We can execute the commands of config.sys after
confirmation by pressing F8 key at the time of booting.
Copy Config.sys
Files=10
Buffer=512
Numlock=ON
Device=c:\mouse.drv
Device=c:\printer.drv
F6

Potrebbero piacerti anche