Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Introduction to DOS CTIN January 13, 2000 Sandy Bacik, Senior Security Consultant Breakwater Security Associates
Agenda <ul><li>What is DOS </li></ul><ul><li>Filenames </li></ul><ul><li>Files </li></ul><ul><li>DOS Overview </li></ul><u...
What is an operating system? It manages an environment that contains working programs and grunt workers supplying subtasks...
DOS D  isk O  perating S  ystem An operating system that deals with hard disks.  DOS worries about how files are stored an...
Pieces of DOS Kernel: Command Processor: <ul><ul><ul><li>IO.SYS, MSDOS.SYS, DBLSPACE.BIN, DRVSPACE.BIN </li></ul></ul></ul...
Key files to DOS <ul><li>IO.SYS </li></ul><ul><li>MSDOS.SYS </li></ul><ul><li>COMMAND.COM </li></ul>
FAT File Allocation Table <ul><li>This tracks what is using what portions of the hard disk. </li></ul><ul><li>There are ac...
File Names Short Filename (SFN) <ul><ul><li>8.3 Standard - (8 characters).(3 characters) </li></ul></ul><ul><ul><li>Charac...
File Names Long Filename (LFN) <ul><ul><li>Update 254 characters, including the path name </li></ul></ul><ul><ul><li>Inclu...
Long Filenames to Short Filenames (1) No 2 files can have the same LFN and/or SFN If the LFN fits the SFN standard, the LF...
Long Filenames to Short Filenames (2) If the LFN does not fit the SFN standard, then <ul><ul><li>All spaces are stripped f...
Long / Short Filename (1)
Long / Short Filename (2)
Long / Short Filename (3)
File Types ASCII or plain text files Binary files, non-human readable <ul><ul><ul><li>Word processing files </li></ul></ul...
Deleting a File - What Happens? The data is not erased from your disk. 1.  0 is placed in all the cluster locations in the...
Wildcards ? (question mark) <ul><ul><li>Any character can go in that location </li></ul></ul>* (asterisk or star) <ul><ul>...
CONFIG.SYS <ul><li>Executed by MSDOS.SYS upon system boot </li></ul><ul><li>It lets the system know how many files can be ...
AUTOEXEC.BAT <ul><li>Executed by COMMAND.COM upon system boot </li></ul><ul><li>A series of DOS batch file commands create...
Files A place to store data Directories A place to store files
6 File Attributes <ul><li>Read-only </li></ul><ul><li>Hidden </li></ul><ul><li>System </li></ul><ul><li>Volume Label </li>...
Pathname A sequence of directory names followed by a file name. Path Similar to a pathname, but does not contain the file ...
Parent Directory Any directory that contains subdirectories
Internal Commands <ul><li>Commands which reside in memory </li></ul><ul><li>Part of COMMAND.COM </li></ul><ul><li>Simplest...
External Commands <ul><li>Commands ending with .COM, .EXE, or .BAT </li></ul><ul><li>Precedence order: .COM, .EXE, .BAT </...
Redirection >> Append > Write, starting at the beginning | Pipe to something, write < Input to
Getting Command Help HELP <command> <command> /?
Sample Commands - Directories MKDIR CHDIR or CD RMDIR
Top 10 DOS Commands <ul><li>CD </li></ul><ul><li>DIR </li></ul><ul><li>MD </li></ul><ul><li>RD </li></ul><ul><li>FORMAT </...
DOS File Commands <ul><li>ATTRIB </li></ul><ul><li>COPY </li></ul><ul><li>DEL </li></ul><ul><li>DIR </li></ul><ul><li>FC <...
DOS Floppy Disk Commands <ul><li>CHKDSK </li></ul><ul><li>DISKCOMP </li></ul><ul><li>DISKCOPY </li></ul><ul><li>FORMAT </l...
DOS Hard Disk Commands (1) <ul><li>APPEND </li></ul><ul><li>CD </li></ul><ul><li>DBLSPACE </li></ul><ul><li>DBLSPACE.SYS <...
DOS Hard Disk Commands (2) <ul><li>MSBACKUP </li></ul><ul><li>PATH </li></ul><ul><li>PROMPT </li></ul><ul><li>RD </li></ul...
6 Points of a Batch File <ul><li>Pure ASCII text file </li></ul><ul><li>Must end with .BAT </li></ul><ul><li>To stop use C...
DOS Batch File Commands <ul><li>CALL </li></ul><ul><li>CHOICE </li></ul><ul><li>ECHO </li></ul><ul><li>ERRORLEVEL </li></u...
Questions?
Thank you Contact: Sandy Bacik email: san04@att.net phone: 253-661-9327
Upcoming SlideShare
Loading in …5
×

011300 Intro To Dos

864 views

Published on

Published in: Technology
  • Be the first to comment

011300 Intro To Dos

  1. 1. Introduction to DOS CTIN January 13, 2000 Sandy Bacik, Senior Security Consultant Breakwater Security Associates
  2. 2. Agenda <ul><li>What is DOS </li></ul><ul><li>Filenames </li></ul><ul><li>Files </li></ul><ul><li>DOS Overview </li></ul><ul><li>Sample Batch File </li></ul>
  3. 3. What is an operating system? It manages an environment that contains working programs and grunt workers supplying subtasks, when requested to perform an action.
  4. 4. DOS D isk O perating S ystem An operating system that deals with hard disks. DOS worries about how files are stored and how to access them.
  5. 5. Pieces of DOS Kernel: Command Processor: <ul><ul><ul><li>IO.SYS, MSDOS.SYS, DBLSPACE.BIN, DRVSPACE.BIN </li></ul></ul></ul><ul><ul><ul><li>COMMAND.COM </li></ul></ul></ul>
  6. 6. Key files to DOS <ul><li>IO.SYS </li></ul><ul><li>MSDOS.SYS </li></ul><ul><li>COMMAND.COM </li></ul>
  7. 7. FAT File Allocation Table <ul><li>This tracks what is using what portions of the hard disk. </li></ul><ul><li>There are actually 2 copies of FAT for each logical drive. </li></ul>
  8. 8. File Names Short Filename (SFN) <ul><ul><li>8.3 Standard - (8 characters).(3 characters) </li></ul></ul><ul><ul><li>Characters were upper case A-Z, numbers 0-9 and any of the following symbols($ % ‘ _ @ ~ ` ! ( ) { } ^ # &) </li></ul></ul>
  9. 9. File Names Long Filename (LFN) <ul><ul><li>Update 254 characters, including the path name </li></ul></ul><ul><ul><li>Includes the above characters plus + , ; = [ ] and lower case a-z </li></ul></ul>
  10. 10. Long Filenames to Short Filenames (1) No 2 files can have the same LFN and/or SFN If the LFN fits the SFN standard, the LFN and the SFN are the same.
  11. 11. Long Filenames to Short Filenames (2) If the LFN does not fit the SFN standard, then <ul><ul><li>All spaces are stripped from the name </li></ul></ul><ul><ul><li>Upper cases what remains </li></ul></ul><ul><ul><li>Uses the first 8 characters of the name and first 3 characters following the first dot (.) </li></ul></ul><ul><ul><li>If the SFN exists, then the last 2 or more characters are lopped off, substituting a tilde (~) and a sequential 1, 2 or more digit number </li></ul></ul>
  12. 12. Long / Short Filename (1)
  13. 13. Long / Short Filename (2)
  14. 14. Long / Short Filename (3)
  15. 15. File Types ASCII or plain text files Binary files, non-human readable <ul><ul><ul><li>Word processing files </li></ul></ul></ul><ul><ul><ul><li>Databases and spreadsheets </li></ul></ul></ul><ul><ul><ul><li>Program files </li></ul></ul></ul><ul><ul><ul><li>Sound or image files </li></ul></ul></ul>
  16. 16. Deleting a File - What Happens? The data is not erased from your disk. 1. 0 is placed in all the cluster locations in the FAT that belong to that file. 2. It changes the very first entry in the directory entry from ASCII to the special value E5h, digital value 229, and extended ASCII value lower case sigma.
  17. 17. Wildcards ? (question mark) <ul><ul><li>Any character can go in that location </li></ul></ul>* (asterisk or star) <ul><ul><li>Any group of characters can go in that location </li></ul></ul>
  18. 18. CONFIG.SYS <ul><li>Executed by MSDOS.SYS upon system boot </li></ul><ul><li>It lets the system know how many files can be opened at one time </li></ul><ul><li>It contains instructions to load device drivers </li></ul>
  19. 19. AUTOEXEC.BAT <ul><li>Executed by COMMAND.COM upon system boot </li></ul><ul><li>A series of DOS batch file commands created by the user to be executed each time the PC is turned on or rebooted </li></ul>
  20. 20. Files A place to store data Directories A place to store files
  21. 21. 6 File Attributes <ul><li>Read-only </li></ul><ul><li>Hidden </li></ul><ul><li>System </li></ul><ul><li>Volume Label </li></ul><ul><li>Subdirectory </li></ul><ul><li>Archive </li></ul>
  22. 22. Pathname A sequence of directory names followed by a file name. Path Similar to a pathname, but does not contain the file name.
  23. 23. Parent Directory Any directory that contains subdirectories
  24. 24. Internal Commands <ul><li>Commands which reside in memory </li></ul><ul><li>Part of COMMAND.COM </li></ul><ul><li>Simplest and most commonly used commands </li></ul><ul><li>For example: </li></ul><ul><ul><ul><li>DEL MKDIR PATH REM </li></ul></ul></ul><ul><ul><ul><li>DIR SET TIME COPY </li></ul></ul></ul><ul><ul><ul><li>CHDIR VOL IF GOTO </li></ul></ul></ul>
  25. 25. External Commands <ul><li>Commands ending with .COM, .EXE, or .BAT </li></ul><ul><li>Precedence order: .COM, .EXE, .BAT </li></ul><ul><li>Do not need the extension to execute </li></ul><ul><li>For example: </li></ul><ul><ul><ul><li>APPEND FDISK FIND </li></ul></ul></ul><ul><ul><ul><li>FORMAT ATTRIB SORT </li></ul></ul></ul><ul><ul><ul><li>LABEL PRINT XCOPY </li></ul></ul></ul>
  26. 26. Redirection >> Append > Write, starting at the beginning | Pipe to something, write < Input to
  27. 27. Getting Command Help HELP <command> <command> /?
  28. 28. Sample Commands - Directories MKDIR CHDIR or CD RMDIR
  29. 29. Top 10 DOS Commands <ul><li>CD </li></ul><ul><li>DIR </li></ul><ul><li>MD </li></ul><ul><li>RD </li></ul><ul><li>FORMAT </li></ul><ul><li>COPY </li></ul><ul><li>DEL </li></ul><ul><li>UNDELETE </li></ul><ul><li>TYPE </li></ul><ul><li>CTRL-BRK </li></ul>
  30. 30. DOS File Commands <ul><li>ATTRIB </li></ul><ul><li>COPY </li></ul><ul><li>DEL </li></ul><ul><li>DIR </li></ul><ul><li>FC </li></ul><ul><li>MOVE </li></ul><ul><li>RENAME </li></ul><ul><li>REPLACE </li></ul><ul><li>TYPE </li></ul><ul><li>UNDELETE </li></ul><ul><li>VERIFY </li></ul>
  31. 31. DOS Floppy Disk Commands <ul><li>CHKDSK </li></ul><ul><li>DISKCOMP </li></ul><ul><li>DISKCOPY </li></ul><ul><li>FORMAT </li></ul><ul><li>LABEL </li></ul><ul><li>SYS </li></ul><ul><li>UNDELETE </li></ul><ul><li>UNFORMAT </li></ul><ul><li>VOL </li></ul>
  32. 32. DOS Hard Disk Commands (1) <ul><li>APPEND </li></ul><ul><li>CD </li></ul><ul><li>DBLSPACE </li></ul><ul><li>DBLSPACE.SYS </li></ul><ul><li>DEFRAG </li></ul><ul><li>DELTREE </li></ul><ul><li>FDISK </li></ul><ul><li>MD </li></ul><ul><li>MOVE </li></ul>
  33. 33. DOS Hard Disk Commands (2) <ul><li>MSBACKUP </li></ul><ul><li>PATH </li></ul><ul><li>PROMPT </li></ul><ul><li>RD </li></ul><ul><li>REPLACE </li></ul><ul><li>RESTORE </li></ul><ul><li>SHARE </li></ul><ul><li>SUBST </li></ul><ul><li>TREE </li></ul>
  34. 34. 6 Points of a Batch File <ul><li>Pure ASCII text file </li></ul><ul><li>Must end with .BAT </li></ul><ul><li>To stop use CTRL-C or CTRL-BRK </li></ul><ul><li>Simple list of command </li></ul><ul><li>Virtually all DOS commands can be used </li></ul><ul><li>DO NOT RELY on the DOS manual </li></ul>
  35. 35. DOS Batch File Commands <ul><li>CALL </li></ul><ul><li>CHOICE </li></ul><ul><li>ECHO </li></ul><ul><li>ERRORLEVEL </li></ul><ul><li>FOR..IN..DO </li></ul><ul><li>GOTO </li></ul><ul><li>IF/IF NOT </li></ul><ul><li>PAUSE </li></ul><ul><li>REM </li></ul><ul><li>%0-%9, %var% </li></ul><ul><li>SHIFT </li></ul>
  36. 36. Questions?
  37. 37. Thank you Contact: Sandy Bacik email: san04@att.net phone: 253-661-9327

×