Introduction to Operating Systems: Key Concepts
Concept:1.Command Line Commands
    Commands are not case-sensitive
  • Echo: outputs a string of text to the console
  • CD: Changes the working directory
  • D:: Changes the working directory to drive D:
  • dir: list the files that are in a directory
  • mkdir directory: makes a new directory
  • PROMPT : Can change the system prompt. By default the prompt is the current working directory followed by the greater than sign.
  • PATH: sets the list of the directories that the operating system will search when the user issues a command or the name of a program to execute.
  • TYPE: will read a text file and display the contents to the user - the display could be garbled if the file specified is not a text file.
  • COPY: copy file1 file2 will make a copy of file1 with the new name file2
    copy dir1\file1 : issued with only one file specified will copy file1 from directory dir1 into the current working directory.
  • CLS: Clears the screen, bringing the cursor to the top of the screen.
Concept:2.Special File Names/Types
Some file extensions are used by the operating system to idenitfy programs that can be executed. The extensions commonly used are .bat, .com, and .exe. When entering a command (such as sort) the operating system will seach all of the directories in your PATH for the file to be executed (sort.bat, sort.com, sort.exe).
Concept:3.Batch Programs (scripts)
A batch file, or batch program, contains a list of commands to be executed. Batch files usuall end with the .bat extension; there is support for loops and conditional processing in batch files and they can be complex.
Concept:4.Redirecting Program Input
When a program is run, the program can receive its input from a file rather than from the keyboard (or console) using the sysbol < Example: the program echo.bas reads input from the keyboard and echos the data back to the screen. : blassic echo.bas. Any text file could be used as input rather than the console by using:
blassic echo.bas < daysAway.bas will send the contents of the daysAway.bas program to the screen as if the user had typed it in.
Concept:5.Redirecting Program Output
Output from a command can be redirected to a file - meaning that output from the command will not be displayed on the screen it will be sent to a file. If the output file does not exist it will be created; if the output file does exist, it will be overwritten.
Example: dir > toc.txt this creates a text file containing the directory listing of the current directory.

Output from a command can be appended (added to the end) to an existing file using >>h;
Example: dir >> myfiles.txt
If the file specified does not exist it will be created, if the file myfiles.txt does exist the contents of the current directory will be added to the end of the file.

Concept:6.Piping
Piping refers to using the output from one command as input to another, the commands are connected using the symbol |
Example: the command dir /p will show you the contents of the current directory, one page at a time. The command dir | more will show you the contents of the current directory - also one page at a time - but also provides you with the additional functions of the more command, such as just seeing the next line (instead of the next full screen).