Tuesday, June 25, 2013

DOS

DOS

1.  Short for Disk operating system, DOS is an acronym often used to describe MS-DOS.
2.  Short for Disk operating system, DOS refers to any operating system that runs from a disk drive. Today, all operating systems can be considered disk operating systems.
3.  Short for Denial of Service, a DoS attack is a form of attacking another computer or company by sending millions or more requests every second causing the network to slow down, cause errors or shut down. Because it is difficult for a single individual to generate enough traffic for a DoS attack to be successful, these attacks are usually run from multiple computers infected by worms that have created zombie computers to all run at the same time to generate a DDoS attack.
Disk drives
Your PC has one or more floppy disk drives and possibly a fixed (or hard) disk to store programs and data. The advantage of a hard disk is that it can store large amounts of data which can be accessed relatively quickly. SST, however, can be run successfully on a PC with only a single floppy disk drive .

Default drive

The "default drive" is where DOS expects to find your programs and data. To remind you which drive is currently the default, the DOS prompt is preceded by a letter which refers to it. A and B refer to floppy disk drives, while C refers to the hard disk (if one is installed). In the User's Guide all examples of DOS commands are preceded by a default drive designation (typically A>) to avoid confusion with SST commands.

Changing the default drive

To change the default drive, type the desired drive letter followed by a carriage return. DOS will respond with a prompt that gives the desired drive as the default.

Directories

  • To obtain a listing of the files on the default drive (a directory), give the command:
  • A>dir
  • To a listing of the files on another drive, type:
  • A>dir a:
  • to see, for example, which files are on the A disk. You could, of course, first make A the default drive and then give the previous command, but this is more cumbersome. This example illustrates a general feature of DOS. Unless you specify otherwise, DOS assumes that it will be dealing with the default drive. You can perform most operations without changing the default drive by specifing another drive letter at the appropriate spot.

Specifying a filename

  • Most DOS commands require you to specify one or more filenames. Valid filenames are composed of up to eight characters and are optionally followed by an extension of up to three characters. The filename and extension are separated by a period. Some examples of DOS filenames are:
  • sst.exe
  • demo.cmd
  • junk
  • Extensions can be used to remind you what the file contains. SST uses the extension `.cmd' for files of SST commands and the extension `.sav' for SST system files.

Copying files

  • Frequently you will want to make a copy of a file. To copy a file (named oldfile) to a new file named newfile, enter:
  • A>copy oldfile newfile
  • The file newfile will have exactly the same contents as the file oldfile. As always, DOS assumes oldfile is on the default drive and also places newfile on the default drive. The syntax of DOS commands when two filenames are required is usually "from to", i.e. the first filename is the source (or "from") file and the second is the destination (or "to") file.
  • To copy a file from one disk to another, it is only necessary to precede the filename by a drive designation. If you are copying files between disks, then the copy can have the same filename as the original. In fact, if you do not supply a filename for the destination, DOS assumes that you want to use the same filename as the source. For example, if B is the default drive, the following command makes a copy of the file oldfile from the A disk on the B disk with the same name:
  • B>copy a:oldfile
  • On the other hand, if oldfile is on B (the default drive) and you would like a copy on the A disk, type:
  • A>copy oldfile a:
  • (It is not necessary to precede oldfile with a drive designation since it is on the default drive.) If there is already a file named oldfile on A (the destination drive), it will be overwritten.

Abbreviating filenames in DOS

  • DOS allows you to use a simple scheme of wild cards to refer to multiple filenames without having to type out the entire list of filenames that you want. There are two wild cards, the question mark and the asterisk. A question mark matches any character while an asterisk matches any string of characters. For example, `s?t' matches `sat', `sst', and `st'. Similarly, `s*t' would match each of the previous names as well as`short', `s123.45t'. The abbreviation `*.sav' would match any filename with the extension `.sav' (i.e., any SST system file), while `*' (or, equivalently, `*.*') would match any filename.
  • To obtain a listing of all the files on the A drive with the extension `.sav', type:
  • B>dir a:*.cmd
  • To copy all files from A to B, you could use the command:
  • C>copy a:*.* b:
  • SST uses a similar scheme of wild cards to abbreviate variable names.

Listing the contents of a file on the monitor

  • To display the contents of a text file on the monitor, you can use the DOS type command which has the following syntax:
  • A>type filename
  • As always, if the filename is not preceded by a drive specification, DOS assumes the file is on the default drive. To type a file on the A drive, use instead:
  • B>type a:filename
  • Not all files in DOS are textfiles. Files with the extension `.exe' or `.com' are executable programs stored in a binary format which cannot be typed.

To stop scrolling output on the screen

If you attempt to type a large file, it is apt to scroll down the screen faster than you are able to read it. To stop scrolling, press the and the keys simultaneously. To restart output, press the and keys again.

To print what is on the screen

  • If you have a printer connected to your computer and you would like a "hard" copy of what is currently on the screen, depress the and keys simultaneously, and DOS will send a copy of what is on the screen to your printer. If you want to obtain a printed copy of the rest of your computer session, depress the and keys simultaneously. Further output will be sent to the printer as it appears on the screen. To stop printing depress these keys again.

Subdirectories

  • DOS allows you to organize disks into subdirectories--groupings of files in a tree structure. For most purposes a subdirectory on a disk is used as if it were a separate disk.
  • To create a subdirectory named sst, type:
  • C>mkdir sst
  • The subdirectory sst now exists. There are two ways to access files in the subdirectory. First, you can make the subdirectory the default directory in the same way that you make a disk drive the default drive. This is done by changing directories:
  • C>cd sst
  • You are now located within the sst subdirectory. To obtain a listing of files in the sst subdirectory, give the command:
  • C>dir
  • Unless you specify otherwise, DOS assumes that you only want a listing of files in the default subdirectory--which is whatever subdirectory you happen to be located in at the time you issue a command. To return to the main (or root) directory, give the command:
  • C>cd \
  • The backslash (`\') is DOS's symbol for the top directory.
  • The other way to access files in a subdirectory is to provide DOS with a path telling it how to find the file you are interested in. If you are in the root directory and you would like to see the contents of a file in the sstsubdirectory, try:
  • C>type sst\filename
  • Thus, it is not necessary to change directories to access a file in another directory.
  • DOS allows you to create subdirectories in subdirectories so directory structures can become rather complicated. We do not recommend this practice if you are a newcomer to DOS. For the purposes of this manual we will assume that you do not have subdirectories to subdirectories.
  • Specifying pathnames can become rather tedious and DOS provides a facility for specifying which directories are to be searched for programs with the path command. If you type:
  • C>path \;\sst
  • DOS will search the root directory (\) and the sst subdirectory (\sst) when it looks for programs to execute. With the above path command, it is possible to execute sst, for example, without being located in the sst subdirectory.

The AUTOEXEC.BAT file

Every time you start your computer, DOS looks for a file called autoexec.bat on the default drive and, if it finds this file, it executes the commands there.

No comments:

Post a Comment