Command (computing)
- Command (computing)
-
In computing, a command is a directive to a computer program acting as an interpreter of some kind, in order to perform a specific task. Most commonly a command is a directive to some kind of command line interface, such as a shell.
Specifically, the term command is used in imperative computer languages. These languages are called this, because statements in these languages are usually written in a manner similar to the imperative mood used in many natural languages. If one views a statement in an imperative language as being like a sentence in a natural language, then a command is generally like a verb in such a language.
Many programs allow specially formatted arguments, known as flags, which modify the default behaviour of the command, while further arguments describe what the command acts on. Comparing to a natural language: the flags are adverbs, whilst the other arguments are objects.
Examples
Here are some commands given to a command line interpreter (Unix shell).
This command changes the user's place in the directory tree from their current position to the directory /home/pete. cd is the command and /home/pete is the argument:
cd /home/pete
This command prints the text hello out to the standard output stream, which, in this case, will just print the text out on the screen. echo is the command and "Hello World" is the argument. The quotes are used to prevent Hello and World being treated as separate arguments:
echo "Hello World"
These commands are equivalent. They list files in the directory /bin. ls is the command, /bin is the argument and there are three flags: -l, -t and -r:
ls -l -t -r /bin ls -ltr /bin
This displays the contents of the files ch1.txt and ch2.txt. cat is the command and ch1.txt and ch2.txt are both arguments.
cat ch1.txt ch2.txtThis lists all the contents of the current directory. dir is the command and "A" is a flag. There is no argument. Here are some commands given to a different command line interpreter (the DOS, OS/2 and Microsoft Windows command prompt). Notice that the flags are identified differently but that the concepts are the same:
dir /A
This displays the contents of the file readme.txt. type is the command. "readme.txt" is the argument. "P" is a parameter...
type /P readme.txt
See also
- List of Unix programs
- List of DOS commands
- Formal grammar
External links
- command from FOLDOC
Categories:- User interfaces
- Computing terminology
- Computing commands
Wikimedia Foundation. 2010.
Look at other dictionaries:
Command & Conquer 4: Tiberian Twilight — Developer(s) EA Los Angeles Publisher(s) Electronic Arts … Wikipedia
Command & Conquer: Renegade — Developer(s) Westwood Studios Publisher(s) EA Games Se … Wikipedia
Command & Conquer: Red Alert 3 — Red Alert 3 cover art Developer(s) EA Los Angeles Publisher(s) Elect … Wikipedia
Command & Conquer: The First Decade — PAL Boxart Developer(s) EA Los Angeles, Barking Lizards Technologies, Base Camp Films, Gametap Entertainment, Westwood Studios … Wikipedia
Command & Conquer: Tiberian Sun — Tiberian Sun cover art, depicting protagonist GDI commander Developer(s) Westwood Studios Publish … Wikipedia
Command & Conquer: Red Alert (iOS) — Command Conquer: Red Alert Logo of Command Conquer: Red Alert Developer(s) Electronic Arts Pu … Wikipedia
Command & Conquer: Yuri's Revenge — Developer(s) Westwood Pacific Publisher(s) EA Games Series … Wikipedia
Command & Conquer 3: Kane's Wrath — Developer(s) EA Los Angeles BreakAway Games[1] Publisher(s) … Wikipedia
Command line completion — is a common feature of command line interpreters, in which the program automatically fills in partially typed tokens. Depending on the specific interpreter and its configuration, these elements may include commands, arguments, environment… … Wikipedia
Command HQ — Developer(s) Ozark Softscape Publisher(s) Microplay Software Designer(s) Danielle Bunten Berry … Wikipedia
Фильмы
- The Stratosphere Arrow., 1971 — Annotation: The film tells about the new Soviet ultrasonic airplane ТУ-144, about the work of airplane constructors . Film description: Test flight of a supersonic passenger plane TU-144 (1968 year)…
