Professional Documents
Culture Documents
Computer Operating System Command Line Interface
Computer Operating System Command Line Interface
DOS provides features essential to control hardware devices such as Keyboard, Screen, Disk Devices, Printers,
Modems and programs.
DOS Files
The main portions of MS-DOS are the IO.SYS, MSDOS.SYS, and COMMAND.COM files.
IO.SYS and MSDOS.SYS are special, hidden system files
The IO.SYS file moves the systems basic I/O functions into memory and then implements the MS-DOS default
control programs, referred to as device drivers, for various hardware components.
These include the following:
The boot disk drive
The console display and keyboard
The systems time-of-day clock
The parallel and serial communications port
Loading of DOS
The system start-up routine of ROM runs a test called Power On Self Test (POST) which check whether
peripherals connected to the computer are working or not & RAM memory.
The ROM bootstrap loader attempts to read the Boot record and if successful, passes the control on to it. The
instructions/programs in the boot record then load the rest of the program.
The boot tries to load the DOS into the memory by reading the two hidden files IO.SYS, MSDOS.SYS, If these
two are found, they are loaded along with the DOS command interpreter COMMAND.COM.
Dos Commands
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)
Windows File Systems
The precise manner in which data is organised on a hard disk drive is determined by the file system used. File systems
are generally operating system dependent.
The FAT file system was first introduced in the days of MS-DOS way back in 1981. The purpose of the File Allocation
Table is to provide the mapping between clusters the basic unit of logical storage on a disk at the operating system level
and the physical location of data in terms of cylinders, tracks and sectors the form of addressing used by the drives
hardware controller.
FAT12-The first incarnation of FAT, supported a maximum partition size of 8MB.
FAT16- supported a maximum partition size of 2GB.
FAT32- supported a maximum partition size of 2TB works for BIOS and 3TB for UEFI and more.
Disk volumes
Every hard disk has a volume structure that lists the size of the available space, and maps out how the data is broken up
and stored on the disk. The volume structure determines what a computer "sees" when a disk is connected.
Partitions
The most common volume structure for a single hard drive is a single partition, where the drive appears to the computer
to be a single drive.
Primary Partition and Active Partition:
A primary partition is in which an Operating System can be installed. One MBR hard disk may contain a maximum of 4
primary partitions. An active partition is based on primary partition. Any one of the 4 primary partitions can be set as active
partition. Since there can be 4 primary partitions with 4 different Operating Systems installed, one of the partition that is
marked active is used for the initial booting. The active partition contains the boot loader (such as ntldr or bootmgr) to load
operating systems from a disk.
Extended Partition and Logical Partition:
Because the primary only can be created four maximum, this need to use extended partition to break the limitation of 4
partitions. In an Extended Partition you can create unlimited logical drives. You can store data in the logical partitions
similar with primary partition, but the extended partition is not used to store data, because the Extended Partition is used
to hold logical partitions, at the same time, there is one extended partition on a disk.
The Rules of Partitioning a Hard Drive
A hard disk drive must be partitioned before you can use it. There are some rules as follows:
A maximum of four primary partitions can be created on any MBR hard disk. The limitation of four primary
partitions is that when one primary partition is applied to the system the master boot record is structured.
There is only one primary partition can be designated as active partition and this partition is used to boot system.
BIOS will only recognize the active partition for loading operating system. Other partitions cant be recognized.
To break the limitation of at most 4 primary partitions, you have to create 3 or less primary partitions plus an
extended partition and there is only one extend partition.