Вы находитесь на странице: 1из 9

Name: Muoz, Clara Mae I.

Section: ES11FA1
Date Performed:
Date Submitted: 5Dec2017
Instructor: Engr. Acoba

LABORATORY ACTIVITY NO.1

DOS

1. Objective(s):

The activity aims to introduce the significance of Disk Operating System (DOS) and apply the use of different
command in managing computer and files.
2. Intended Learning Outcomes (ILOs):

The students shall be able to:

1. Familiarize the environment of CLI


2. Apply the use of different DOS commands.

3. Discussion:

DOS (Disk Operating System) was the first operating system used on the original IBM PC. It is a
non-graphical command line operating system created for IBM compatible computers that was first introduced
by Microsoft in August 1981. DOS systems utilize a command line interface (CLI). Programs are started by
entering their filename at the command prompt. It includes several programs as system utilities and provides
additional commands that don't correspond to programs which are internal command.

Figure 1. DOS Command Line Interface

Some of the most common commands are as follows (corresponding commands on Unix-like operating systems
are shown in parenthesis):

CD - changes the current directory (cd)


COPY - copies a file (cp)
DEL - deletes a file (rm)
DIR - lists directory contents (ls)
EDIT - starts an editor to create or edit plain text files (vi, vim, ed, joe)
FORMAT - formats a disk to accept DOS files (mformat)
HELP - displays information about a command (man, info)
MKDIR - creates a new directory (mkdir)
RD - removes a directory (rmdir)
REN - renames a file (mv)
TYPE - displays contents of a file on the screen (more, cat)
For more information on a specific command, type HELP command-name.

4. Resources:

DOS

5. Procedure and Output

The Command Prompt

When you first turn on your computer, you will see some cryptic information flash by. The MS-DOS
displays this information to let you know how it is configuring your computer. You can ignore it for now. When the
information stops scrolling past, you'll see the following:

This is called the command prompt or DOS prompt. The flashing underscore next to the command prompt is
called the cursor. The cursor shows where the command you type will appear.

How go to Windows Command Line?


Windows NT, 2000, and XP users Windows Vista and 7 Windows 8
users users

1. Click Start. 1. Click Start. 1. From the Start screen


2. Click Run. 2. Type cmd and type cmd and press
press enter. enter.
3. Type cmd or command and
press enter. or

1. Move the mouse cursor


to the very bottom-left
corner of the screen
and right-click or
press Windows key +
X.

2. This will open


the power user task
menu, select
either Command
Prompt or Command
Prompt (Admin).

MS-DOS and the Windows command line are not case sensitive. The files and directories shown in
Windows are also found in the command line. When working with a file or directory with a space, surround it in
quotes. For example, My Documents would be "My Documents". Filenames can have a long file name of 255
characters and a 3 character file extension.

When a file or directory is deleted in the command line, it is not moved into the Recycle bin. If you need
help with any of command type /? after the command. For example, dir /? would give v the options available
for the dir command.

Exercise No.1
Set the default console foreground and background colors.

Syntax:
COLOR [background][foreground]

Follow the following steps to set the foreground and background color.

1. In CMD, type HELP to check all commands with its corresponding function. Search for the
command named COLOR. In your drive C directory type COLOR ? to view the color
attributes. Color attributes are specified by two hexadecimal digits wherein the first digit
corresponds to the background and the second digit corresponds to the foreground.
2. Type COLOR fc to produce light red foreground on bright red background. If no argument is
given, this command restores the color to what it was the time you open the cmd.exe.
3. Change the background and foreground of your command prompt to 01.
What color combination it produces? Black and Blue
4. Again, change the background and foreground of your command prompt to 33.
What color combination it produces? Just the same. Nothing happened.
5. Explain your answer in question no.4
Nothing will happen if the two numbers of the command is similar for these 2 digits represent
the foreground and background. Nothing will be visible if foreground is as the same color as
background.

Exercise No.2

Displays the list of files and subdirectories in a directory.

Syntax:
dir

Follow the following steps to check and display the list of files and subdirectories in a directory.

1. In CMD, type dir. What drive your command prompt display? Drive C
This is called a directory list. A directory list is a list of all the files and subdirectories that a
directory contains. In this case, you see all the files and directories in the main or root
directory of your drive. All the files and directories on your drive are stored in the root directory.
2. What drive do you see? Volume in drive C
3. Write the volume serial number of your drive? 80C3-E17E
4. Record the total file(s), total directories and the total size.

Total number of files and size: 0 Files ; 0 Bytes


Total number total of directories and size: 7 Dir(s) 851,863,011,328 bytes free

5. List all the directory in drive C.


22/03/2017 11:24 AM <DIR> Intel
19/11/2017 02:07 PM <DIR> PerfLogs
22/11/2017 10:12 PM <DIR> Program Files
22/11/2017 10:06 PM <DIR> Program Files (x86)
18/11/2017 10:48 PM <DIR> SWSETUP
18/11/2017 11:04 PM <DIR> Users
22/11/2017 11:59 PM <DIR> Windows

6. Type dir /p. What output do you see after executing the command? Volume in drive
C is Windows, Volume serial Number is 80C3-E17E , Directory of C:\ , File Not
Found
Note that the slash you type in this command is a backslash (\), not a forward slash
(/).
No matter which directory you are in, this command always returns you to the root directory of a
drive. The root directory does not have a name. It is simply referred to by a backslash (\).

7. Now, type dir /w/p. What output do you see after executing the command?
Volume in drive C is Windows
Volume Serial Number is 80C3-E17E
Directory of C:\
[Intel] [PerfLogs] [Program Files] [Program Files (x86)]
[SWSETUP]
[Users] [Windows]
0 File(s) 0 bytes
7 Dir(s) 851,634,024,448 bytes free
8. List the differences of the three command when it comes to output display.
dir: It displays the files or folders and directories in the current directory.
dir /p: It displays files and directory page wise.
dir /w/p: It displays files in a wide format as many as 5 files on each line.

Exercise No.3

Create a text files

Syntax:
md <directory name>
mkdir <directory name>

Follow the following steps to check and display the list of files and subdirectories in a directory.

1. In CMD, type md or mkdir <your last name>.


2. Then, type dir to check the list of directory of your drive. Did you see the directory you
created? Yes
3. Now, check the content of your created directory. To confirm, type dir followed by directory
name and press enter.
4. What is the new entry of directory looks like?

5. How many files do you see and what is the size of your directory? 0 Files ; 0 bytes
Why? Explain your answer. There is no files nor folders that the directory contains.

Exercise No.4

To change directory and delete directory

Syntax:
cd <directory name>
chdir <directory name>

Delete directory

Syntax:

del <directory name>

Follow the following steps to change directory and to delete one of more files.

1. In the main directory of your drive C, type cd <directory name>. What line was displayed?
C:\muoz>

2. Check the content of the directory you created. Write the output below:
3. What command is needed to check the content of your directory? dir
4. What is the size of your directory? 2 Dir(s) 851,622,502,400 bytes free
Why? Explain your answer. There is no any file saved on the directory and the size displayed
is the available space on the drive.
5. Go back from your created directory, type cd.. . What happen after executing the command?
The directory returned to the parent directory or moved back by one directory.
6. Now, delete the file directory you created.
7. Use the dir command to confirm.

Exercise No.5

To change and view files in different drive

1. From drive C, type the following at the command prompt d: (Note that if your computer has no
drive D, check what other drive is present in my My Computer).
2. What happened after executing the command?

3. How are you going to go back to the original drive? You can return to the original drive just by
typing c:
SUPPLEMENTAL ACTIVITY

Answer the following questions.

1. Give a version of MS-DOS that is available in the market? Version 10.0.16299.64


2. To display or changes file attributes, what DOS command will you use? Attrib. attrib +a, attrib +h,
attrib /s, attrib /d, etc.
3. What is the DOS command to clear the screen of your command prompt? cls
4. What is the DOS command to display an executable application using DOS like notepad and
calculator? .exe
DOS Command to display notepad: notepad.exe
DOS Command to display calculator: calc.exe
5. To check the IP address and MAC address of your computer, what DOS command are you going to
use? Ipconfig/all
Record your IP address: 192.168.254.108
Record your MAC address: 3C-52-82-2D-EB-D1
6. What is the purpose of path command? It the shell which directories to search for executable files in
response to commands issued by a user. It increases both the convenience and the safety of such OS
and is widely considered to be the single most important environmental variable. It also clear all search
path settings and direct cmd.exe to search only in the current directory.
7. What is the DOS command to quit the command prompt? exit
8. How are you going to check the system information of your computer? systeminfo
Host name: LAPTOP-RMVEDJH2
OS name, version and manufacturer: Microsoft Windows 10 Home Single Language; 10.0.16299 N/A
Build 16299; Microsoft Corporation
Processor: Intel64 Family 6 Model 142 Stepping 9 GenuineIntel ~2511 Mhz
Total physical memory: 3,981 MB
Available physical memory: 1,460 MB
9. How are you going to turn on your computer through command prompt? Shutdown/r
10. How are you going to shut down your computer through command prompt? Shutdown/s
6. Conclusion:

MS-DOS is a non-graphical command line operating system that allows the user to manage the computer

and files with the use of different commands. In spite of its very small size and relative simplicity, it is one of

the most successful operating systems that has been developed to date.