Command (computing): Difference between revisions

Content deleted Content added
Reverting edit(s) by 194.83.57.102 (talk) to rev. 1086307464 by Somers-all-the-time: non-constructive (RW 16.1)
added diax diag
Tags: Reverted references removed
Line 7:
Specifically, the term ''command'' is used in [[imperative programming|imperative]] [[computer language]]s. The name arises because [[statement (programming)|statements]] in these languages are usually written in a manner similar to the [[imperative mood]] used in many [[natural language]]s. 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 or options, which modify the default behaviour of the program, while further [[Parameter (computer science)|arguments]] may provide objects, such as files, to act on. As an analogy to a natural language, the flags are adverbs, while the other arguments are [[object (grammar)|object]]s.compt.prompt i love black people
 
 
 
Line 13 ⟶ 14:
Here are some commands given to a [[command-line interpreter]] ([[Unix shell]]).
 
The following command changes the user's working position in the [[directory tree]] to the directory ''/home/pete''. The utility program is ''[[Cd (command)|cd]]'' and the argument is ''/home/pete'':owen chalkly love it in hte a
cd /home/pete
 
The following command prints the text ''Hello World'' on the [[standard output]] stream, which, in this case, just prints the text on the screen. The program name is [[Echo (command)|echo]] and the argument is "Hello World". The quotes are used to prevent ''Hello'' and ''World'' being treated as separate tokens:
echo "Hello World"
 
The following commands are equivalent. They list files in the directory ''/bin''. The program is ''[[ls]]'', having three flags (''l'', ''t'', ''r''), and the argument is the directory ''[[Filesystem Hierarchy Standard|/bin]]'':
ls -l -t -r /bin
ls -ltr /bin
 
The following command displays the contents of the files ''ch1.txt'' and ''ch2.txt''. The program name is ''[[cat (Unix)|cat]]'', having two file name arguments:
cat ch1.txt ch2.txt
 
Here are some commands for the [[DOS]], [[OS/2]] and [[Microsoft Windows]] [[Cmd.exe|command prompt]] processor. The following command displays the contents of the file ''readme.txt''. The program name is ''[[TYPE (DOS command)|type]]'' and the argument is ''readme.txt''.<ref>{{cite web | url = https://ss64.com/nt/type.html | access-date = 14 March 2019 | title = Type - Display a text file - Windows CMD | publisher = SS64.com }}</ref>
type readme.txt
 
The following command lists the contents of the current directory. The program name is ''[[Dir (command)|dir]]'', and ''Q'' is a flag requesting that the owner of each file also be listed.<ref>{{cite web | url = https://ss64.com/nt/dir.html | access-date = 14 March 2019 | title = DIR - list files and folders - Windows CMD | publisher = SS64.com }}</ref>
dir /Q
 
== See also ==
* [[Gesture recognition]]
* [[List of Unix commands]]
* [[List of DOS commands]]
* [[Formal grammar]]
 
== References ==
{{Reflist}}
 
== External links ==
{{Wikibooks|Guide to Windows commands}}
*[http://foldoc.org/command command] from [[FOLDOC]]
*[https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands Windows Commands | Microsoft Docs]
 
{{Unix commands}}
{{Windows commands}}
 
[[Category:User interfaces]]
[[Category:Computing terminology]]
[[Category:Computing commands| ]]