Thursday, February 28, 2008

Using DOS: #3 The Directory & Formating

In computer file systems the root directory is the first or top-most directory in a hierarchy. It can be likened to the root of a tree - the starting point where all branches originate. This is like the index of a book. When you specify a file in some command like copy or delete and the O.S. accesses the file by using the name to look up the "track and sector" info in the directory. The command for this is DIR.


Using Directory:
DOS provides commands for dealing with directories:

  1. MD (MKDIR): To create a new subdirectory
  2. RD (RDDIR): To remove a directory
  3. CD (CDDIR): To move from one directory to another
  4. Tree: Displays all the subdirectories from any point in the directory tree. To see the directory structure of the whole
  5. DELTREE: Lets you remove a subdirectory structure even if it's not empty

Using the FORMAT command:

The function of the FORMAT command is used to prepare a disk or diskette for use by DOS or Windows. It also does the following:
  • Initializes a disk so that DOS can store information on it.
  • Examines the disk for any defective sectors and stores the information in the FAT (File Allocation Table).
  • Initializes the directory
  • Sets up space for the FAT
  • Records the boot program in the boot record
Example: After you reach the command center of DOS you type the following:

FORMAT [d:] [/s] [/v]

[d:]
is the drive with the disk to format
[/s] causes the operating system files to be transferred to the new disk
[/v] allows you to specify a "volume label" to identify the disk

****YOU CAN'T USE A DISK THAT HAS NOT BEEN FORMATTED; YOU NEED TO FORMAT IT FIRST. BUT, IF YOU HAVE A DISK THAT HAS INFORMATION ON IT AND YOU FORMAT IT, YOU WILL LOSE ALL OF THE INFORMATION THAT HAS BEEN STORED ON IT.

Using DOS: #2 Starting DOS & Basic Functions & Simple Commands

Unlike WINDOWS which has a GUI (Graphic User Interface), DOS uses a different system where if you want something done you must Command DOS to do it and DOS carries out your command.

(Ex: Try to envision a stereo with a keyboard... To turn the volume up louder you simply type the words volume: 10, and it gets louder, just as easily as to increase the volume, you simply command volume: 3 and the volume decreases.

We use the operating system primarily for the following functions:

  • preparing and organizing disks for use
  • formatting diskettes
  • setting up directories and sub-directories
  • running programs
  • copying and moving file
Starting DOS:
  1. Click on the DOS icon on the desktop (if it exists) OR
  2. Enter "start/run/command" from windows desktop OR
  3. Enter "start/run/cmd" from windows desktop
DOS Command Summary:

CHKDSK: Checks the status of a disk and prepares the status report
CLS: Clears the display monitor
COPY: Copies one or more files
DATE: Changes the system date
DEL: Deletes one or more files
DIR: Lists the files in the directory
DISKCOPY: Copies a complete diskette
ERASE: Deletes one or more files
FORMAT: Prepares a disk for use
RENAME: Renames disk files
TIME: Changes the time for the system
TYPE: Displays file contents on the moniter




Using DOS: #1 DOS Definition


DOS (from Disk Operating System) commonly refers to the family of closely related operating systems that dominated the IBM PS Compatible market between 1981 and 1995 or until about 2000.

DOS is a single user, single task operating system with basic core functions that are non-reentrant code; once a process is begun, it must be allowed to run until finished before the same process can be used again. The DOS core provides various functions for programs, like displaying characters on the screen, reading a character from the keyboard, and accessing disk files.