section topic readings ======================================================== 4 DOS - 1 DOS1-DOS38 5 DOS - 2 DOS41-DOS71 ======================================================== - what is an operating system? - basic software on any computer - DOS, unix, VM/CMS, VMS, finder, etc... - 4 things that an operating system does - boots computer - mediates between hardware and software - user interface - file structure and file management commands DOS -- the primary operating system for the IBM-PC and compatibles - there are different versions of DOS, which have different capabilities - these are usually numbered, higher numbered versions require more current computers, more memory, faster processors, etc. - some really old PC's may require older versions of DOS - booting the computer - turning it on and loading DOS - parts of DOS: system files, command.com, utilities - the DOS prompt - can be customized - is normally set up to display the default storage device and subdirectory - default: value assumed by computer unless user specifies otherwise - the DOS Command-line interpreter -- COMMAND.COM - the command interpreter COMMAND.COM - reads the commands you type in - tries to carry them out format: command as in: print fred.txt - what it does when you type in a command - looks to see if this is a DOS internal command - looks for EXE BAT or COM file with same name - keeps looking down given path - if no resolution gives error message - formatting a diskette - using the lab menus - also mention FORMAT command as shown in book (part of DOS) - everything stored in a computer is a file - data, programs, pictures, etc. - files have different properties - name, size, creation date, etc. - most important property is file name - different operating systems have different rules for file names - file specification (all 4 parts) - device - path - filename - extension C:\group1\project.txt ^ ^ ^ ^ | | | | dev path fname ext - DOS device names - connection from software to hardware - device name refers to port - driver software handles software interface - always end in a colon (:) - disk drives - logical ports (lpt1:, com1:) - some simple DOS commands - getting a directory of files (DIR) - copying a file (COPY) - changing the name of a file (RENAME) - removing a file from disk (DEL) - obtaining HELP for DOS commands - the DOS hierarchical file structure - the default drive - the directory and subdirectories - parent, child and sibling directories - the root directory - making subdirectories (MKDIR) - changing subdirectories (CD) - removing subdirectories - if the device and/or path is specified when giving a file name those values replace the current defaults - wildcard characters and their use in filenames ? - matches any character * - matches any group of characters - moving a set of files form one subdirectory to another fairly complete list of DOS commands ------------------------------------ * denotes good commmands to know * APPEND Allows programs to open data files in specified directories as if they were in the current directory. ASSIGN Redirects requests for disk operations on one drive to a different drive. ATTRIB Displays or changes file attributes. BACKUP Backs up one or more files from one disk to another. BREAK Sets or clears extended CTRL+C checking. CALL Calls one batch program from another. * CD Displays the name of or changes the current directory. CHCP Displays or sets the active code page number. CHDIR Displays the name of or changes the current directory. CHKDSK Checks a disk and displays a status report. CHOICE Waits for you to choose one of a set of choices. * CLS Clears the screen. COMMAND Starts a new instance of the IBM DOS command interpreter. COMP Compares the contents of two files or sets of files. * COPY Copies one or more files to another location. CPBACKUP Backs up one or more files from one disk to another. CPBDIR Gives a report on backup directories. CPSCHED Schedules unattended program execution at specific periods. CTTY Changes the terminal device used to control your system. DATAMON Guards against dataloss on your computer. * DATE Displays or sets the date. DEBUG Runs Debug, a program testing and editing tool. DEFRAG Reorganizes files on disks for optimal performance. * DEL Deletes one or more files. * DELTREE Deletes a directory and all the subdirectories and files in it. * DIR Displays a list of files and subdirectories in a directory. DISKCOMP Compares the contents of two floppy disks. DISKCOPY Copies the contents of one floppy disk to another. DOSKEY Edits command lines, recalls IBM DOS commands, and creates macros. DOSSHELL Starts IBM DOS Shell. DRVLOCK Locks the drive so that media cannot be removed. E Starts IBM DOS Editor, which creates and changes ASCII files. ECHO Displays messages, or turns command echoing on or off. * EDIT Starts IBM DOS Editor, which creates and changes ASCII files. EDLIN Starts Edlin, a line-oriented text editor. EJECT Ejects the media from a drive. EMM386 Turns on or off EMM386 expanded memory support. ERASE Deletes one or more files. EXE2BIN Converts .EXE (executable) files to binary format. EXIT Quits the COMMAND.COM program (command interpreter). EXPAND Expands one or more compressed files. FASTOPEN Decreases the amount of time needed to open frequently used files and directories. FC Compares two files or sets of files, and displays the differences between them. FDISK Configures a hard disk for use with IBM DOS. FIND Searches for a text string in a file or files. FOR Runs a specified command for each file in a set of files. * FORMAT Formats a disk for use with IBM DOS. GOTO Directs IBM DOS to a labelled line in a batch program. GRAFTABL Enables IBM DOS to display an extended character set in graphics mode. GRAPHICS Loads a program that can print graphics. * HELP Provides Help information for IBM DOS commands. IBMAVD Detect and remove viruses from your system. IBMAVSP Interactive, stand-alone AntiVirus program for recovery from catastrophic virus damage. IF Performs conditional processing in batch programs. INTERLNK Displays status of INTERLNK-INTERSVR redirected drives. INTERSVR Provides serial or parallel file transfer and printing capabilities via redirected drives. JOIN Joins a disk drive to a directory on another drive. KEYB Configures a keyboard for a specific language. LABEL Creates, changes, or deletes the volume label of a disk. LH Loads a program into the upper memory area. LOADFIX Loads a program above the first 64K of memory, and runs the program. LOADHIGH Loads a program into the upper memory area. MD Creates a directory. MEM Displays the amount of used and free memory in your system. MIRROR Records information about one or more disks. * MKDIR Creates a directory. MODE Configures a system device. MORE Displays output one screen at a time. MOUSE Provides mouse pointer device support. MOVE Moves files and renames file and directories. NLSFUNC Loads country-specific information. * PATH Displays or sets a search path for executable files. PAUSE Suspends processing of a batch file and displays a message. POWER Reduces power used by your computer. * PRINT Prints a text file while you are using other IBM DOS commands. PROMPT Changes the IBM DOS command prompt. QBASIC Starts the IBM DOS QBasic programming environment. QCONFIG Assists IBM support personnel in obtaining detailed technical information about your computer. RAMSETUP Installs RAMBOOST which optimizes your computer's memory. RD Removes a directory. RECOVER Recovers readable information from a bad or defective disk. REM Records comments (remarks) in batch files or CONFIG.SYS. * REN Renames a file or files. * RENAME Renames a file or files. REPLACE Replaces files. RESTORE Restores files that were backed up by using the BACKUP command. * RMDIR Removes a directory. SCHEDULE Schedules unattended program execution at specific periods. SET Displays, sets, or removes IBM DOS environment variables. SETVER Sets the version number that IBM DOS reports to a program. SHARE Installs file-sharing and locking capabilities on your hard disk. SHIFT Shifts the position of replaceable parameters in batch files. SMARTDRV Installs and configures the SMARTDrive disk-caching utility. SORT Sorts input. SUBST Associates a path with a drive letter. SYS Copies IBM DOS system files and command interpreter to a disk you specify. * TIME Displays or sets the system time. TREE Graphically displays the directory structure of a drive or path. * TYPE Displays the contents of a text file. UNDELETE Recovers files which have been deleted. UNFORMAT Restores a disk erased by the FORMAT command or restructured by the RECOVER command. * VER Displays the IBM DOS version. VERIFY Tells IBM DOS whether to verify that your files are written correctly to a disk. VOL Displays a disk volume label and serial number. XCOPY Copies files (except hidden and system files) and directory trees. ================================ some extra stuff if time permits ================================ DOS redirection, pipes and filters ----------------------------------- - standard input and standard output devices - defaults - standard input == keyboard - standard output == display - changing standard input and output > - opens or overwrites file or device for standard output >> - opens file, positions at end of file, for standard output < - opens file or device for standard input - piping of standard input and output - allows standard output of one program to be piped to standard input of another program DIR | SORT > - DOS filters - filter is a small utility program that reads from standard input and writes to standard output SORT - sorts records SORT < (inputfile) > (outputfile) MORE - pauses screen at screenful DIR | MORE FIND - searches files for occurrances of specified strings of text DOS BATCH language ------------------ - what it is - DOS batch language, similar to REXX EXEC programs - requires extension to be .BAT - some simple commands ECHO - turns on/off display of commands as they are processed - displays specific message ECHO ON ECHO OFF ECHO This is a test REM - comments GOTO 'label' :LAB1 REM looping . . . GOTO LAB1 %1, %2, %3, etc -- variables DIR *.%1 IF [NOT] condition command conditions: ERRORLEVEL number - true if previous program had an exit code of 'number' or higher string1==string2 - true when two strings are identical EXIST - true if given filename exists PAUSE - pauses until a key is pressed - a simple BATCH program use TEST %1 to call REM this is a test batch program CLS ECHO this will respond with either FRED or BARNEY IF %1==FRED GOTO LAB1 IF %1==BARNEY GOTO LAB2 ECHO you made a mistake GOTO LAB3 :LAB1 ECHO you entered FRED GOTO LAB3 :LAB2 ECHO you entered BARNEY :LAB3 ECHO end of batch program - AUTOEXEC.BAT - special batch file that is executes when DOS is loaded at bootstrap time