Saturday 5 November 2016

Disk Operating System

Disk Operating System (specifically) and disk operating system (generically), most often abbreviated as DOS, refers to an operating system software used in most computers that provides the abstraction and management of secondary storage devices and the information on them (e.g., file systems for organizing files of all sorts). Such software is referred to as a disk operating system when the storage devices it manages are made of rotating platters, such as floppy disks or hard disks. In the early days of microcomputers, computer memory space was often limited, so the disk operating system was an extension of the operating system. This component was only loaded if needed. Otherwise, disk access would be limited to low-level operations such as reading and writing disks at the sector-level. In some cases, the disk operating system component (or even the operating system) was known as DOS. Sometimes, a disk operating system can refer to the entire operating system if it is loaded off a disk and supports the abstraction and management of disk On the PC compatible platform, an entire family of operating systems was called DOS.

History:

Year
Event
1981
MS-DOS 1.0 was released in August, 1981
1982
MS-DOS 1.25 was released in August, 1982.
1983
MS-DOS 2.0 was released in March, 1983.
1984
Microsoft introduces MS-DOS 3.0 for the IBM PC AT and MS-DOS 3.1 for networks.
1986
MS-DOS 3.2 was released in April, 1986.
1987
MS-DOS 3.3 was released in April, 1987.
1988
MS-DOS 4.0 was released in July, 1988 and MS-DOS 4.01 was released in November, 1988.
1991
MS-DOS 5.0 was released in June 1991.
1993
MS-DOS 6.0 was released in August, 1993 and MS-DOS 6.2 was released in November, 1993.
1994
MS-DOS 6.21 was released in March, 1994 and MS-DOS 6.22 was released in April, 1994.

DOS Commands: A partial list of the most common commands for DOS follows.

a) append: Display or sets the search path for data files. DOS will search the specified path(s) if the file is not found in the current path. This had some creative uses, such as allowing non-CD based games to be run from the CD, with configuration/save files stored on the HD.

a) append;      b) append [d:]path[;][d:]path[...]       c) append [/X:on|off][/E]

b) assign: The command redirects requests for disk operations on one drive to a different drive.
a) assign [x[:]=y[:]...              b) assign /STATUS

Options:
x The drive letter to reassign.      y The drive letter that x: will be assigned to.   /STATUS Displays the current drive assignments.
If typed without parameters then all drive letters are reset to original assignments. The command is available in MS-DOS 5.00.

c) attrib: Change or view the attributes of one or more files. It defaults to displaying the attributes of all files in the current directory.

ATTRIB [+R|-R] [+A|-A] [+S|-S] [+H|-H][drive:][path][filename] [/S [/D]]

Options: To add an attribute attach a '+' in front of it. To remove an attribute attach a '-' in front of it

R - Read-only    A – Archive    S – System       H – Hidden      /D - Process folders as well.

/S - Process matching files in the current folder and all subfolders.

Note: Everything inside a brace [option] is an optional item. Roughly equivalent to the Unix commands chattr and lsattr.

d) backup and restore: Programs to back up and restore files from an external disk. These appeared in version 2, and continued to PC-DOS 5 and MS-DOS 6 (PC-DOS 7 had a deversioned check). In DOS 6, these were replaced by commercial programs (CPBACKUP, MSBACKUP), which allowed files to be restored to different locations.

e) cd or chdir: Change current working directory. Displays the current working directory when used without a path parameter.

Cd: displays the current working directory on the current drive.

cd directory: changes the working directory on the current drive to directory.

chdir e:directory - changes the working directory on E: to directory.

cd .. changes the working directory to the parent directory (up one directory level).

cd \  changes the working directory to the root (top level) directory of the current drive.
Equivalent to the Unix command cd (with a path parameter), or pwd (without a parameter). cd .. changes to the parent directory.

f) chkdsk: Verifies a storage volume (hard disk, partition, floppy disk, flash drive, etc) for file system integrity.

Options:

/F : Fixes errors on the volume (without /F , chkdsk only detects errors)
/P : Forces a full verification  
/R : Searches for defective sectors and recovers legible information (applies /F)
/X : Unmounts the volume before processing if needed. (Note: Unmounting temporarily invalidates all pointers/handlers to the volume until process is completed)

chkdsk volume letter: [[path]filename] [/F] [/P] [/R] [/X]
Equivalent to the Unix command fsck

g) cls: Clears the screen.     Cls - Equivalent to the Unix clear.

h) copy: Copies files from one location to another. The destination defaults to the current directory. If multiple source files are indicated, the destination must be a directory, or an error will result.

Syntax: copy from [source\filename] to [destination\folder]

Files may be copied to devices. For example, copy file lpt1 sends the file to the printer on LPT1. copy file con outputs file to the screen ("console"), which can also be done using type file. Devices themselves may be copied: copy con file takes the text typed into the console and puts it into file, stopping when EOF (Ctrl+Z) is typed. Files may be concatenated using +. For example, copy file1+file2 file_cat will concatenate the files and output them as file_cat. There are two switches to modify the command's behaviour, /a (text mode, the default) and /b (binary mode). In text mode, copy will stop when it reaches the EOF character; in binary mode, the files will be concatenated in their entirety, ignoring EOF characters.

Examples of usage: copy /a alpha.txt + beta.txt gamma.txt
copy /b alpha.mpg + beta.mpg gamma.mpg
Equivalent Unix commands are cp (for copying) and cat (for concatenation). Device files may be copied in Unix as well, e.g. cp file /dev/tty will display a file on the screen (but cat file is more commonly used here). Equivalent RT-11/RSX-11/OpenVMS command is copy.

Examples of usage: copy con filename.extension

i) del or erase: Deletes one or more files. This command is used to delete a particular or more files.

Syntax: del filename      erase filename

Options
*.*  All files in current folder
*.* /s all files in current folder and sub folders,


Equivalent to the Unix command rm. Equivalent in RT-11/RSX-11/OpenVMS operating systems line is delete command which can be contracted to del.

No comments:

Post a Comment