home *** CD-ROM | disk | FTP | other *** search
/ Cheet Sheets 1995 February / CHEET38.ZIP / INSTALL.DAT / 1OSGUIDE.TXT < prev    next >
Text File  |  1995-02-07  |  21KB  |  678 lines

  1. ~DOS Information.
  2.  
  3. Introduction to DOS Commands and Operating Systems.
  4.  
  5. A guide written way back in 1989 by Wayne Roberts.  This guide 
  6. was written for DOS 3.3 (not 5 or 6 !!!).  So many of the 
  7. options maybe different, extended or even non-existant.  This 
  8. guide is only for use as basic info on the DOS commands, please 
  9. refer to your DOS HELP for greater info on the commands included 
  10. in your current operating system.  This is done by typing HELP 
  11. at anytime at the DOS Prompt. 
  12.  
  13.  
  14. ~Introduction.
  15.  
  16. DOS is the acronym for Disk Operating System.  The operating 
  17. system is a large collection of programs that help with the 
  18. management of the computer's resources.  A disk operating system 
  19. also controls the drives for the storing and loading of programs 
  20. and data. 
  21.  
  22. Anyone using a computer with at least one disk drive will have 
  23. some knowledge of a Disk Operating System.  What you need to 
  24. know about DOS is roughly what you are going to use the computer 
  25. for.  Commands in DOS range from simply formatting a disk, 
  26. copying and erasing files, getting a directory of files and 
  27. executing of files. 
  28.  
  29. When you first start using DOS you only need to know the basic 
  30. functions of the DOS commands that you are going to use the most 
  31. often.  As time goes on you can learn the commands in greater 
  32. detail. 
  33.  
  34. Below is a list of DOS commands that I think are used the most 
  35. often and are more useful in a working situation within the 
  36. college. 
  37.  
  38.  
  39. ~ASSIGN
  40.  
  41. This command is used to assign a drive of a certain letter to be 
  42. equal with another drive letter eg. If you have a 5.25" disk 
  43. drive and a 3.5" drive you can swap the letter of the drives 
  44. across making one drive a: whilst making the other b:  
  45.  
  46. ASSIGN A: = B:
  47.  
  48.  
  49. ~CD / CHDIR
  50.  
  51. Allows the user to change from current directory to another 
  52. directory. 
  53.  
  54. CD C:\WINDOWS\EXCEL\USER
  55.  
  56.  
  57. ~CHKDSK
  58.  
  59. Checks a disks directory and file allocation table (FAT).  Also 
  60. reports a status, which includes disk space available, disk 
  61. spaced used, bad sectors etc and can also be used to repair 
  62. errors in the directories or FAT. 
  63.  
  64. CHKDSK a: (Check floppy drive).
  65.  
  66.  
  67. ~CLS
  68.  
  69. Clears the whole of the display screen.
  70.  
  71.  
  72.  
  73. ~COPY
  74.  
  75. Copies one or a selection of files one drive in a particular 
  76. directory to another directory either on the same drive, or 
  77. another, into a different directory or the same.  Files can also 
  78. be copied into each other. 
  79.  
  80. Eg.
  81.  
  82. COPY A:\WORD\WORK.DOC C:\TEMP
  83. COPY C:\TEMP\*.* C:\GAMES
  84.  
  85. Example of copying a file from floppy disk to another directory 
  86. on hard disk. 
  87.  
  88.  
  89. <A:\WORD>copy dos_one.doc C:\temp
  90.         1 File(s) copied
  91.  
  92. <A:\WORD>
  93.  
  94.  
  95. ~DATE
  96.  
  97. Allow user to view, change the system date.
  98.  
  99. Eg.
  100.  
  101. DATE 26-09-89
  102.  
  103.  
  104. ~DEL
  105.  
  106. Allows a user to delete file(s) on an allocated drive and/or 
  107. directory. When stating the wild card "*.*" you will be prompted 
  108. with a message that asks you if you are sure that you wish to 
  109. delete everything in that directory. 
  110.  
  111. DEL C:\GAMES\*.*
  112.  
  113. Example of deleting a file from a directory on the hard disk.
  114.  
  115.  
  116. <C:del c:\temp\dos_one.doc
  117.  
  118. <C:
  119.  
  120.  
  121.  
  122. ~DIR
  123.  
  124. Lists any or all filenames and sub-directories in a particular
  125. directory.
  126.  
  127. DIR A:\WORD\EXERCISES
  128.  
  129. Example of a Directory using DIR.
  130.  
  131. <A:\EXCEL>dir
  132.  
  133.  Volume in drive A is WAYNE-WORD
  134.  Directory of  A:\EXCEL
  135.  
  136. .            <DIR>     21-11-88    1:59p
  137. ..           <DIR>     21-11-88    1:59p
  138. ACCOUNTS  XLS      4280 09-12-88    9:48a
  139. CHART     XLC      2446 09-12-88    9:28a
  140. CMONITOR  XLS      7018 20-03-89   10:02a
  141. CSPRINT   XLS      3226 20-01-89   11:01a
  142. DOTMATRX  XLS      3317 10-01-89   10:01a
  143. FORM      XLS      7948 08-05-89    2:59p
  144. INVOICE   XLS      6585 08-05-89    3:28p
  145. IP        XLS      9799 09-12-88    1:19p
  146. LASER     XLS      4473 26-01-89   11:48a
  147. LOGIC     XLS      3440 09-12-88    3:38p
  148. MMONITOR  XLS      5591 16-03-89    2:35a
  149. PIASTATE  XLS      3822 25-05-89   11:56a
  150. STATEMNT  XLS      5663 10-05-89    2:42p
  151. TREND     XLS       958 20-06-89   11:58a
  152. TREND     XLC      6257 20-06-89    3:20p<+
  153.    |   17 File(s)   | 425984 bytes free   |
  154.    ++      ++       |       |             |
  155. (Filename)(Exten) (Size)(Date Created)(Time)
  156.  
  157.  
  158. ~FORMAT
  159.  
  160. Initialises the disk to accept DOS information and files.  The 
  161. command also checks for defective tracks and optionally place 
  162. DOS on the disk. Using various options you can format the disk 
  163. to various types 
  164.  
  165. eg. FORMAT d:  - formats a floppy to 720  KBytes.
  166.     FORMAT a:  - formats a floppy to 1.44 Mbytes.
  167.     FORMAT /1  - formats a floppy single sided.
  168.  
  169. DO NOT TYPE FORMAT or FORMAT C: WHILST USING THE HARD DISK.
  170.  
  171. Example of using the format command.
  172.  
  173. <C:format a:
  174.  
  175. Insert new diskette for drive A:
  176. and press ENTER when ready...
  177.  
  178. Format complete
  179.  
  180.    1457664 bytes total disk space
  181.    1457664 bytes available on disk
  182.  
  183.  
  184.  
  185. ~MD / MKDIR
  186.  
  187. Creates a new directory or sub-directory.
  188.  
  189. Example.
  190.  
  191. <C: MD WAYNE
  192.  
  193. <C: CD WAYNE (CD - Change directory see CD)
  194.  
  195. <C:\WAYNE>
  196.  
  197.  
  198. ~PATH
  199.  
  200. Typing the command path at the prompt will display the path the 
  201. machine is currently set up to look in.  If file is not found in 
  202. one directory it searches in the next directory defined in the 
  203. path.  Path is set up in the AUTOEXEC.BAT of the computer. 
  204.  
  205. Eg.
  206.  
  207.    PATH = C:\;C:\WORD;C:\EXCEL;C:\GAMES;
  208.  
  209. Typing PATH will give the above message.
  210.  
  211. If you have a program called JUMP.EXE in directory C:\GAMES and 
  212. you type JUMP in the root it will search through the root, WORD, 
  213. and EXCEL directories first before finding the right program. 
  214.  
  215.  
  216. ~PRINT
  217.  
  218. Prints a list of files on the printer, while the computer 
  219. performs other tasks. 
  220.  
  221. Eg.
  222.    PRINT A:\WORD\TESTDOC.DOC
  223.  
  224.  
  225. ~PROMPT
  226.  
  227. Often set up again in the AUTOEXEC.BAT, but can be changed at 
  228. any time whilst using DOS. 
  229.  
  230. Eg.
  231.    PROMPT $L$P$G$  will produce <(current directory)>  <C:\temp>
  232.  
  233.  
  234. ~REN / RENAME
  235.  
  236. Changes the name of a file/files on disk.
  237.  
  238. Eg.
  239.  
  240.   REN a:\filee.txt a:\file
  241.  
  242.  
  243.  
  244. ~RD / RMDIR
  245.  
  246. Removes a subdirectory, which must be empty of any files or 
  247. other directories. 
  248.  
  249. Eg.
  250.  
  251.    RD GAMES
  252.  
  253.  
  254. ~TIME
  255.  
  256. Displays or enables you to set the current system time.
  257.  
  258. Eg. TIME hh:mm:ss:xx   16:32:01
  259.  
  260.  
  261. ~TYPE
  262.  
  263. Display the contents of a file to the screen.
  264.  
  265. Eg.  TYPE A:\TRIAL.TXT
  266.  
  267.  
  268. ~VER
  269.  
  270. Shows the DOS version number to the screen.
  271.  
  272. Example of using VER command with DOS 4.0.
  273.  
  274. <C:VER
  275.  
  276. IBM DOS Version 4.00
  277.  
  278. <C:
  279.  
  280.  
  281.  
  282. ~What is an INTERNAL DOS command ?
  283.  
  284. In internal DOS command is a program built into the command.com 
  285. of your MS-DOS disk.  This means when typing in the command you 
  286. may be in any directory and you will not have to state where to 
  287. find the command.  But with external commands you have to set up 
  288. the path so as the computer can find the command and external 
  289. commands can be deleted. 
  290.  
  291. Examples of some Internal DOS command.
  292.  
  293. CD / CHDIR - Change directory.
  294. MD / MKDIR - Make directory.
  295. TYPE       - Type file to screen.
  296.  
  297.  
  298. ~Execution of commands.
  299.  
  300. The priority of executing programs is very important.  If you 
  301. have more than one program in the same directory it will execute 
  302. them in a certain order, shown below :-
  303.  
  304.                .COM file first
  305.                .EXE file second
  306.                .BAT file third
  307.  
  308. Eg. If three files TEST.COM, TEST.EXE and TEST.BAT are in the 
  309. same directory and TEST is typed, then TEST.COM will be 
  310. executed. 
  311.  
  312. To execute a program called TYPE.COM you would have to rename it 
  313. to another name as in DOS there is an internal command called 
  314. TYPE. If TYPE was entered at prompt it would execute the DOS 
  315. TYPE command not the TYPE.COM file.  To rename the TYPE.COM 
  316. other filename type :-
  317.  
  318. REN TYPE.COM <new name>  in directory with file.
  319.  
  320.  
  321. ~Use of MV command in ROOT Directory.
  322.  
  323. The use of the MV (MOVE) command anywhere on disk and especially 
  324. with wild cards (*'s) and even more in the root directory of the 
  325. hard disk. This is because the MV function as well as copying 
  326. the file removes it from it old position on the disk 
  327. automatically. 
  328.  
  329. In the ROOT directory of the hard disk there are two files 
  330. called "IBMBIO.COM" and "IBMDOS.COM" which are put on a 
  331. particular part of the disk, if they are deleted or moved then 
  332. the hard disk will not work properly next time it is re-booted.  
  333. So if you type MV *.* in the root directory you might as well 
  334. say goodbye to programs stored on the disk which you are enable 
  335. to copy off and then type "FORMAT C:". 
  336.  
  337.  
  338. ~Introduction to UTILITIES.
  339.  
  340. There are many utility programs available today on the software 
  341. market in our computer centre we have six different utility 
  342. program these being PC-TOOLS, PCSHELL, Q-DOS, DOSSHELL, and the 
  343. less used Xtree and Norton Utilities.  Within the computer 
  344. department we all have our own personal preferences, PC-TOOLS 
  345. being mine. 
  346.  
  347. Utility program are mainly used for maintenance of disks 
  348. including deleting, undeleting, compression, sorting, viewing, 
  349. editing etc.. of various files and/or directories. 
  350.  
  351. The next few pages will show how files can be examined, hidden, 
  352. have their attributes changed etc.. using PC-TOOLS. 
  353.  
  354. The opening screen to PC-TOOLS after typing "PCTOOLS" at prompt. 
  355.  
  356. By pressing any key at the opening screen you will go straight 
  357. into the file functions part of PC-TOOLS which shows all the 
  358. files in the current directory. 
  359.  
  360.  
  361.  
  362. ~Editing or viewing a file.
  363.  
  364. To edit a file in PC-TOOLS all you have to do is select the file 
  365. that you wish to edit by moving the highlight bar over the file 
  366. and press return.  When selected (should have a number next to 
  367. it) press 'E' to edit.  You will then be faced with an editing 
  368. screen which includes the options at the bottom of the screen 
  369. and the file which you are editing in the rest of the screen.  
  370. Pressing F3 to edit the file. 
  371.  
  372.  
  373.  
  374. ~Hiding files and/or changing their attributes.
  375.  
  376. To hide or change a files attribute using PCTOOLS you need to 
  377. select the file to be changed by moving the highlight bar above 
  378. it and pressing return.  By selecting 'A' for Attribute you will 
  379. then go into a separate screen for editing the attribute of your 
  380. selected file.  Shown below is a screen dump of the attribute 
  381. edit where the files attribute is being changed so as the file 
  382. becomes hidden. 
  383.  
  384.  
  385. Other attributes of the file can be changed just as easily 
  386. following instruction given on the screen.  These instructions 
  387. are very clear to follow and even a novice can come along and 
  388. change the attribute. 
  389.  
  390.  
  391. ~Hiding a directory using PC-TOOLS.
  392.  
  393. All files in MS-DOS are made up of a series of numbers called 
  394. attributes.  To alter the structure of a file you simply change 
  395. the numbers but only change the numbers if you know what you are 
  396. doing else you may corrupt the file or directory.  One number 
  397. refers specifically to the attribute of the file or directory 
  398. and changing this does the same as in above paragraphs but for 
  399. directories as well. 
  400.  
  401. For example to hide a directory all you need to do is type F3 
  402. for other menu (whilst in file functions), then type 'E' for 
  403. edit, F2 to change sector, 'R' for root, then move down to the 
  404. file attribute and change it as shown overleaf. 
  405.  
  406.  
  407.  
  408. ~The Disks and the Operating System.
  409.  
  410. Obviously as the operating system is called DISK Operating 
  411. System then disks and disk drives are your computer system's 
  412. most important peripherals.  The Keyboard, and VDU are just 
  413. useful input and output devices.  Whereas Printers and Modems 
  414. extend the capability of your system.  The disk drives allow the 
  415. computer to store and retrieve large amounts of information. 
  416.  
  417. Information stored in RAM (Random-Access Memory) is temporary as 
  418. when the computer is turned off it disappears, whereas 
  419. information stored on disk stays until changed or deleted. 
  420.  
  421. The floppy disk is a very fragile piece of equipment able to 
  422. store over 360,000 + characters.  The care of the disks and the 
  423. files on them needs to be taken properly.  Files on the disk 
  424. need to be kept in a tidy order (kept in directories etc.) and 
  425. the disk itself needs to be compressed (a utility used within 
  426. PC-TOOLS) regularly so as files are sorted out properly on the 
  427. disk surface and all bad clusters are deleted. 
  428.  
  429. Floppy drives also need to be cared for.  As they are open to 
  430. the atmosphere dust, dirt etc tends to get within the drive and 
  431. heads can become dirty.  So regular cleaning with a disk 
  432. cleaner. 
  433.  
  434.  
  435. ~Use of Switches and flags in a DOS command.
  436.  
  437. What is a Switch ? - Most DOS commands have options that affect 
  438. the way the command works.  To use the switch options, you must 
  439. "pull the switch" when you use this command.  When you pull the 
  440. switch you tell this command to do extra work or handle the 
  441. command in a different way. Most DOS commands have switches.  
  442. Typing a forward slash (/) and the appropriate switch letter 
  443. will operate the switch.  The switch is often typed at the end 
  444. of the command. 
  445.  
  446. What is a Flag ? - A flag is similar to a switch but is not part 
  447. of the command being used, it is an option used as an extra to 
  448. options built into the command.  The flag often being the 
  449. location of the file. 
  450.  
  451. Examples of switches and flags.
  452.  
  453. FORMAT /s - Formats a disk with system files on it.
  454. DIR /W -    Wide directory listing.
  455. DIR /P -    Directory listing with pause when screen full.
  456. DIR a: -    Directory of floppy disc.
  457.  
  458.  
  459. ~Some common DOS commands.
  460.  
  461. Below is another list of commonly used DOS commands, that have 
  462. been explained in Task One but are explained here in greater 
  463. detail. 
  464.  
  465. The following abbreviations are used in the following section :-
  466.  
  467.      d:    - For drive letter.
  468.      path\ - Directory path for filename.
  469.      .ext  - For extension used.
  470.  
  471.  
  472. PRINT - Is a command used to print a disk file while another 
  473. program is running.  Print is a very primitive way of 
  474. multi-tasking (a way of running more than one program at a 
  475. time). 
  476.  
  477. Print will print the contents of a file to the printer a non 
  478. ASCII text file will probably contain a great deal of control 
  479. codes which may turn you r printer crazy when printed out.  
  480. Printing them use PRINT is exactly the same as using the TYPE 
  481. command but you get a hard copy of the contents. 
  482.  
  483. The syntax of the PRINT command :-
  484.  
  485.      PRINT d:filename.ext /T/C/P...
  486.  
  487. The three switches are optional but the /P option is the default 
  488. if neither of the others is typed.  These switches do the 
  489. following :-
  490.  
  491.                /T Terminate, stop printing
  492.                /C Cancel the printing of a file
  493.                /P Print this file
  494.  
  495. The ... referred to above in the syntax refers to any other 
  496. flags or switches which the user wishes to use. 
  497.  
  498.  
  499. RENAME / REN - allows you to change the name of a file.  DOS 
  500. will accepteither version of the command.  The syntax of the 
  501. RENAME command is :-
  502.  
  503.      RENAME d:path\oldfilename.ext newfilename.ext
  504.  
  505. The oldfilename being the name of file to be renamed and the 
  506. newfilename being the name for it to be changed to. 
  507.  
  508. The path need not be given if the filename is in the current 
  509. directory. DOS protects itself from having to files of the same 
  510. name, an error message is given if a file is being renamed as a 
  511. file that already exists. 
  512.  
  513. RENAME does not touch the contents of a file it only changes the 
  514. name assigned to it.  Be careful when renaming files that you 
  515. don't rename it so as a program does not find it when execution 
  516. is in progress. 
  517.  
  518. CHKDSK - Checks the directory and file allocation table (FAT) of 
  519. the disk and reports disk and memory status.  Also able to 
  520. repair errors in the directories or FAT. 
  521.  
  522. The syntax of the CHKDSK command is :-
  523.  
  524.      CHKDSK d:\filename.ext /F/V
  525.  
  526. The switches F and V do the following :-
  527.  
  528.           /F Fixes the File Allocation Table, if errors are found.
  529.           /V Shows CHKDSK's progress and more detailed information
  530.              about the errors it finds. (Verbose) 
  531.  
  532. Examples of the use of CHKDSK.
  533.  
  534. a) CHKDSK - analyzes the disk or diskette in the current drive.
  535. b) CHKDSK A: - analyzes the diskette in a:
  536. c) CHKDSK A:/F - analyzes the diskette in a: and asks permission to
  537.    repair the FAT if a flaw is found.
  538.  
  539. Example output from a CHKDSK command.
  540.  
  541. <C:chkdsk
  542.  
  543. Volume 5740544     created 02-10-1989 2:39p
  544.  
  545.   21170176 bytes total disk space
  546.      81920 bytes in 5 hidden files
  547.      51200 bytes in 21 directories
  548.   18251776 bytes in 670 user files
  549.      20480 bytes in bad sectors
  550.    2764800 bytes available on disk
  551.  
  552.       2048 bytes in each allocation unit
  553.      10337 total allocation units on disk
  554.       1350 available allocation units on disk
  555.  
  556.     655360 total bytes memory
  557.     471504 bytes free
  558.  
  559.  
  560.  
  561. FORMAT - Initializes the disk to accept DOS information and 
  562. files.  Thecommand also checks the disk for defective tracks and 
  563. optionally places DOS on the disk. 
  564.  
  565. The syntax of FORMAT command is :-
  566.  
  567.      FORMAT d: /O/V/S
  568.  
  569. The three switches doing the following :-
  570.  
  571.         /O Formats an 8-sector diskette and leaves the proper 
  572.            places in the directory for the operating system, but 
  573.            does not place the operating system on the disk.
  574.  
  575.           /V Write a volume label on the disk.
  576.  
  577.           /S Places on the disk a copy of the operating system, 
  578.              which makes the diskette bootable (able to reset 
  579.              machine on it).
  580.  
  581.  
  582. Using PCFORMAT (Formatter with DOS 4.0) you are able to format 
  583. using other options (Shown Below). 
  584.  
  585. <C:pcformat a: /h
  586.  
  587. PC Tools Disk Formatter v4.11
  588.  
  589. The PCFormat options are:
  590.  
  591. /V     Add volume label
  592. /S     Include DOS; make it bootable
  593. /TEST  Simulation; disk isn't written
  594. /1     Single-sided
  595. /4     360k disk in 1.2 Meg drive
  596. /8     8 sectors per track
  597. /N:ss  Sectors per trk (8,9,15,18)
  598. /T:tt  Tracks (40,80)
  599. /F     Reformat & rewrite entire diskette
  600. /DESTROY  Format & erase diskette
  601.  
  602. See part one for an example of the FORMAT command.
  603.  
  604.  
  605. PATH - Sets up the path for DOS to search the specified 
  606. directories on the specified drives if a program or batch file 
  607. is not found in the current directory.  The path is usually set 
  608. up in the AUTOEXEC.BAT and is usually formatted in the following 
  609. way :-
  610.  
  611.      PATH= C:\;C:\DOS;C:\UTILITY;C:\WORD5;C:\ORACLE;C:\GAMES;
  612.  
  613. When a command is typed and the current disk drive name is not 
  614. given DOS will search the current drive directories.  If the 
  615. file is not found int the current directory and the other given 
  616. directories an error message will occur. 
  617.  
  618.  
  619.  
  620. PROMPT - Allows the user to set up the system prompt to his/her 
  621. desired format.  The prompt being <A: or <C:\DOS. 
  622.  
  623. The syntax of the prompt command being :-
  624.  
  625.      PROMPT promptstring
  626.  
  627. The promptstrings available are as follows :-
  628.  
  629. `      Character               What it Produces
  630.  
  631. `          $                   $, the dollar sign
  632. `          _ (underscore)      Carriage return, move top next line.
  633. `          b                   |, vertical line
  634. `          e                   The escape character
  635. `          d                   Date
  636. `          h                   Backspace
  637. `          g                   >, greater than sign
  638. `          l                   <, less than sign
  639. `          n                   current drive
  640. `          p                   the current drive and directory
  641. `          q                   =, equal sign
  642. `          t                   Time
  643. `          v                   Dos Version
  644.  
  645. `     All others               Nothing or null, ignored
  646.  
  647.  
  648. Examples of the PROMPT command.
  649.  
  650. 1) PROMPT - a: or c: (normal prompt)
  651.  
  652. 2) PROMPT The current Drive is $n: - The current drive is a:
  653.  
  654. 3) PROMPT $p - A:\WORD5\TEMP (Current directory)
  655.  
  656. 4) PROMPT $l$p$g - <C: (Prompt used in computer centre)
  657.  
  658.  
  659. TYPE - This command allows a user to display the contents of a 
  660. file to the screen.  Works in exactly the same way as the PRINT 
  661. command but does not print the file onto paper unless CTRL-P or 
  662. by adding "> PRN" at the end of the command. 
  663.  
  664. Syntax of the TYPE command.
  665.  
  666.      TYPE d:path\filename.ext
  667.  
  668.  
  669. DOS is a very large and comprehensive operating system and as 
  670. explained is an essential part of a computer system.  DOS can be 
  671. easy for many people to learn but others may struggle.  Probably 
  672. the easiest way of learning DOS is to experiment with various 
  673. files on your floppy disk.  Expermenting on the hard disk is not 
  674. recommended as you may corrupt files or programs essential to 
  675. the hard disk.   
  676.  
  677. Happy DOSsing.
  678.