Software that provides a blank line and cursor on screen, allowing the user to type in instructions for immediate execution. All major operating systems (Windows, Mac, Unix, Linux, etc.) support command lines that system administrators and programmers can use to perform myriad operations more directly and efficiently than by using a graphical user interface (GUI). After typing a command, it is executed by pressing the enter key.
There are numerous Windows/DOS commands in this encyclopedia, all of which have a "DOS" prefix, such as "DOS Copy" and "DOS dir. Following are two brief command examples. To do these operations in Windows Explorer or a Windows-based Pkzip utility would take numerous mouse clicks.
Command Operation Performed
copy *.html d:\abc Copy all HTML files in
the current folder to the
ABC folder in the D drive.
pkzip xyz *.jpg Compress all JPEG files in
the current folder into a
Zip archive named XYZ.ZIP.
Interactive or Sequential
Commands can be executed interactively by the user, one at a time, or several commands can be executed sequentially as a group. To execute a group, the commands are saved in a text file with a name and extension (.bat for DOS, .cmd for Windows and .sh for Unix, Linux and Mac). The name of the file is typed on the command line, and after pressing Return, each command is executed in order. This file of commands is called a "script" or "batch file." See command processor
Windows Command Line
This example shows three commands issued after the command line was launched in Windows XP. The cd /stage switches focus to the STAGE folder. The dir *.cmd lists all Windows batch files, which have a .CMD extension, and setstage executes the commands in the SETSTAGE.CMD file.
Mac/Unix/Linux Command Line
This example from Mac OS X, which is a Unix-based operating system, shows two commands issued after the command line ("terminal window") was launched. The cd desktop switches focus to the desktop, and ls X* lists all files that begin with upper case "X."