Practical 3
3. What is Operating System? Explain basic DOS commands.
An operating system (OS) is a software program that manages the hardware and software resources of a computer. The OS performs basic tasks, such as controlling and allocating memory, prioritizing the processing of instructions, controlling input and output devices, facilitating networking, and managing files.
During the booting process commands are
automatically loaded into the computer’s memory. They are in fact included in
the Command.com file. So these commands are executable immediately after
getting the dos prompt.
A few internal commands are
- VER
- VOL
- DATE
- TIME
- CLS
- DIR
- MD
- CD
- PATH
- RD
- COPY CON
- TYPE
- COPY
- DEL
- REN
A command can be written in Capitals or Small
letters also. They are executed from command prompt. When you type command on cmd prompt and press "Enter" internal commands execute immediately.
VER: - Every
operating System has its own edition number or release or version number. The
version number indicates which edition of operating system you are working on.
Syntax: VER
Example: C:\> Ver
Output: Microsoft Windows [Version 6.1.7600]
VOL: - It
is used to display volume label and serial number of the current drive
Syntax: Vol
Example: C:\> VOL
DATE:
- It is used to display the current system date and prompt
for entering new date.
Syntax: Date
Example: C:\> date
TIME: - Displays the current system Time and prompt for
entering new time.
Syntax:
Time
Example:
C:\> Time
CLS: - It is used to Clear the screen.
Syntax:
CLS
Example:
C:\> CLS
DIR: -
This command displays the list of directories and files with details like date
of creation
whether it is directory or file
etc.
Syntax: DIR
Switches:
dir/p : To view page wise result along with it display
label and serial no.
dir/w : Displays width wise result of filenames and directories with details and
along with it display label and serial no..
dir/b : Display only file and directory without any
details.
dir/l : Display all the information in lower case
letters.
Example:
DIR *.txt Display
all the files with extension .txt
DIR D???.* Display
all the files starting with D and having less than or equal to
four characters in the file name and any
extension.
Here “?” And “*” are called “wild
card character”. “*” Stand for any number of the character. “?” Stands
for one character.
MD OR MKDIR:
Used to create a new Directory.
Syntax: MKDIR OR MD
DIRECTORY NAME
Example: C :\> MD JAMS
CD OR CHDIR: - This command allows you to change present
directory to another directory.
Syntax: CD
Example: C:\> CD JAMS
RD: - To
delete the empty directory.
Syntax: RD
NOTE: -The
directory must be empty when we use RD.
Example: C:\> RD JAMS
Switches: -
RD/s – Remove with
subdirectories and files.
RD /q – Don’t ask to
confirm.
COPY
CON: This command is used to create a new file.
Syntax: COPY CON
<FILENAME>
Example: C:\> Copy Con
JAMS.txt
Note:
- Type the content of the file here and when completed, press Ctr+Z or
F6 key followed by Enter to save the current document.
TYPE: -
This command is ude to see the contents of an existing file.
Example: C :\> TYPE JAMS
COPY: - This
command is used to copy an existing file from one location to another or one
directory to another with different name or exiting name.
SYNTAX: COPY < SOURCE FILE NAME> <TARGET FILENAME>
Example: C:\> COPY JAMS.TXT E:\SP
Example: C :\> COPY JAMS.TXT C:\JAMS_new\Reena\TITHI
You can also have the
option to change the name of files as you copy it.
Example: C :\>
COPYold.TXT C:\dos\new.txt
DEL/ERASE: This
command removes one or more files from the disk or current working directories.
SYNTAX: DEL filespec [/p]
or ERASE filespec [/p]
Example: C:\> DEL abc
Switches:
del /p –confirmation
del/q – In quit mode
REN: Used
to rename or change name of the file or directory.
SYNTAX: REN <file
name> <new file name>
Example: REN JAMS JAMS1
TREE:
- It is used to display the tree structure of current directory graphically.
Syntax: TREE [drive:]
[path] [/f]
[/F] : displays the names of the files in each directory.
Comments
Post a Comment