DOS Tutorial: Understanding the Disk Operating System and Its Commands, Summaries of Computer science

This tutorial provides an overview of the Disk Operating System (DOS) and its role in controlling the computer's hardware and providing an environment for programs to run. It covers various DOS commands such as 'echo', 'pause', 'net use', 'dir', 'copy', 'type', 'ren', 'md', 'cd', 'prompt', and 'del'. The tutorial also explains how to create, rename, and delete files and subdirectories using DOS.

Typology: Summaries

2020/2021

Uploaded on 06/02/2022

hammaad-hayat
hammaad-hayat 🇬🇧

13 documents

1 / 24

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Doss Tutorial
DOS = Disk Operating System
The DOS controls the computer’s hardware and gives an environment for programs to run.
This system program must always be current when working with your computer.
Why you need it?
1. DOS controls the flow of information between you and the computer (translator)
2. Also allows you to store and retrieve information on your computer
3. It allows you to interprets and translates the software you have on your computer
4. Furthermore, gives you access to all its function( e.g. saving and copying files)
Echo: It is one of the most commonly used built-in commands for Linx bash and C shell, which is
typically used in scripting language and bath file so it can display a line of text on standard output or
a file
Pause - It is used between codes or even as the last code.
Net use: Net= a framework that gives programming guidelines that can be used to develop a wide
range of applications
Before you begin this tutorial:
Firstly open the command prompt (Start > run cmd )
Make sure that prompt is C:\>V If it is not,
Type: cd/ - this should be place you into the C:\> Working directory
Set the Date and Time
Firstly type date at the prompt, if it is wrong then type the write date in: (dd-mm-yy )
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18

Partial preview of the text

Download DOS Tutorial: Understanding the Disk Operating System and Its Commands and more Summaries Computer science in PDF only on Docsity!

Doss Tutorial DOS = Disk Operating System The DOS controls the computer’s hardware and gives an environment for programs to run. This system program must always be current when working with your computer. Why you need it?

  1. DOS controls the flow of information between you and the computer (translator)
  2. Also allows you to store and retrieve information on your computer
  3. It allows you to interprets and translates the software you have on your computer
  4. Furthermore, gives you access to all its function( e.g. saving and copying files) Echo: It is one of the most commonly used built-in commands for Linx bash and C shell, which is typically used in scripting language and bath file so it can display a line of text on standard output or a file Pause - It is used between codes or even as the last code. Net use: Net= a framework that gives programming guidelines that can be used to develop a wide range of applications Before you begin this tutorial: Firstly open the command prompt (Start > run cmd ) Make sure that prompt is C:>V If it is not, Type: cd/ - this should be place you into the C:> Working directory

Set the Date and Time

Firstly type date at the prompt, if it is wrong then type the write date in: (dd-mm-yy )

Press the enter key Type time at the prompt if it is wrong then type time in format below example: : 8:46:03:59 (this show Nano secs) Press return

Directory Command

The directory will have list of Filenames, File extensions, Size of each file and Date and time the file was last updated. Type: dir and press return By CTRL AND LETTER S at the same time, you are able to freeze the listing to view your files

  1. All filenames that begin with letter C will be listed. Press F3 key Then backspace twice and replace C* WITH a* and then press enter. All filenames that begin with the letter A are listed.

List Files with the Same Extensions

First type dir*.bat and press enter. Now all files with the .bat extension are listed

Press F3 key Now backspace three times and replace the (.bat) extension with the .sys extension and press enter. Now all files with the .sys extension should now be listed.

Clear the Screen

Enter in: CLS at the C:> Prompt then press enter.

Create a File with DOS

Enter in : copy con Quick.Itr and press return

Copy a File with a New Extension

Firstly, type in copy quick.Itr quick.bac then press enter After type in dir q* then press enter Three files should be now listed on the screen.

Type a File with DOS

If you need to check the contents of a parriticular file/any DOS file you will need to use the TYPE command Enter in: type quick2.Itr and press return

DOS prints the contents of the file. Never use the TYPE command with files that have the .com, .exe, .sys, and .bas extensions. These are program files and will only display junk on the screen

Rename a File

This command lets you rename the before file with a new name Firstly, type in ren quick2.Itr sales.Itr and press return Type dir *.Itr and press return Now DOS will only display the screen 2 files that have the .Itr extension: quick.Itr and sales.Itr

Rename a Group of Files

At first you need to type in: ren *.Itr *.bob and press return

Move to a Subdirectory

Once you have created a subdirectory, to move to that directory, you will use the CHANGE DIRECTORY command, a.k.a. CD. Directions:

  1. Type: cd \info and press return.
  2. Type: cd and press return.
  3. The name of the directory is listed.

Set the DOS Prompt

You can set or change the standard system prompt to display the name of the directory or subdirectory you are currently working in. Directions:

  1. Type: prompt $p $g and press return.
  2. The DOS prompt tells you that you are working in the C directory (drive) and in the Info subdirectory.
  3. Type: dir and press return. The single dot stands for the current directory. The double dots stand for the parent directory (root). The dots are often referred to as place markers

Copy a File into a Subdirectory

The COPY command lets you copy files from one directory to another. Directions:

  1. Type: copy sales.bob \info and press return.
  2. Type: dir \info and press return.

3. Notice that a copy of Sales.bob is copied into the subdirectory Info. The original

file is also in the root directory.

Copy a Group of Files into a Subdirectory

When copying a group of files from the root directory into a subdirectory, it is necessary to use the wildcard character ***** along with the COPY command. Directions:

  1. Type: copy quick. \info* and press return.
  2. DOS will list the files being copied.
  3. Type: dir \info and press return.
  4. Three files should be listed in the Info subdirectory.

List Files in the Root from a Subdirectory

The DIRECTORY command is also used to get a listing of all the files in the root directory while in a subdirectory. The backslash character ** represents the root directory. Directions:

  1. Type: *dir * and press return. All the files in the root directory are listed

Select the Directory List

To look for a specific filename extension, you can use the SELECTED DIRECTORY command. Directions:

  1. Type: dir *.bat and press return.

NOTE: The backslash character ** directs DOS to read from the root directory. The *. requests the listing of the subdirectories.

Delete a Single File

Periodically it is a good idea to delete files from the hard disk which are no longer needed or used. DOS makes it easy to remove these files with the DELETE command, a.k.a. DEL. Directions:

  1. Type: cd.. and press return.
  2. The prompt shows you that you are back in the root directory.
  3. Type: del sales.bob and press return.
  4. Type: dir Sales.bob and press return.
  5. Sales.bob is no longer listed because it has been deleted.

Delete a Group of Files

By using the wildcard character ***** you can delete a group of files from your hard drive. Directions:

  1. Type: del quick.* and press return.
  2. Type: dir quick.* and press return.
  3. All Quick files have been deleted.