Questions tagged [command]

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. Use [command-pattern] for the design pattern.

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.

More links:

9693 questions
5310
votes
62 answers

How to execute a program or call a system command from Python

How do you call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script?
freshWoWer
  • 54,641
  • 10
  • 32
  • 33
1226
votes
3 answers

What is the difference between the remap, noremap, nnoremap and vnoremap mapping commands in Vim?

What is the difference between the remap, noremap, nnoremap and vnoremap mapping commands in Vim?
Chetan
  • 41,886
  • 27
  • 101
  • 142
680
votes
18 answers

How do I ignore files in Subversion?

How do I ignore files in Subversion? Also, how do I find files which are not under version control?
andyuk
  • 34,840
  • 15
  • 49
  • 52
659
votes
15 answers

Run Command Prompt Commands

Is there any way to run command prompt commands from within a C# application? If so how would I do the following: copy /b Image1.jpg + Archive.rar Image2.jpg This basically embeds an RAR file within JPG image. I was just wondering if there was a…
user
  • 14,579
  • 27
  • 76
  • 95
455
votes
14 answers

Equivalent of *Nix 'which' command in PowerShell?

How do I ask PowerShell where something is? For instance, "which notepad" and it returns the directory where the notepad.exe is run from according to the current paths.
DevelopingChris
  • 36,999
  • 27
  • 83
  • 117
364
votes
4 answers

PHP shell_exec() vs exec()

I'm struggling to understand the difference between shell_exec() and exec()... I've always used exec() to execute server side commands, when would I use shell_exec()? Is shell_exec() just a shorthand for exec()? It seems to be the same thing with…
Webnet
  • 55,814
  • 100
  • 278
  • 454
360
votes
2 answers

How to create a link to a directory

How to create a link xxx to /home/jake/doc/test/2000/something/? Assume the xxx is created under /home/jake and you're currently in /home/jake. When you do cd xxx, you directly go to /home/jake/doc/test/2000/something/.
read Read
  • 4,797
  • 4
  • 24
  • 29
352
votes
5 answers

What is the difference between git clone and checkout?

What is the difference between git clone and git checkout?
Praveen Sripati
  • 29,779
  • 15
  • 74
  • 108
348
votes
7 answers

How can I recall the argument of the previous bash command?

Is there a way in Bash to recall the argument of the previous command? I usually do vi file.c followed by gcc file.c. Is there a way in Bash to recall the argument of the previous command?
The Coder
  • 3,483
  • 3
  • 13
  • 4
323
votes
19 answers

Stop node.js program from command line

I have a simple TCP server that listens on a port. var net = require("net"); var server = net.createServer(function(socket) { socket.end("Hello!\n"); }); server.listen(7777); I start it with node server.js and then close it with Ctrl + Z on…
Eleeist
  • 6,401
  • 10
  • 47
  • 72
318
votes
5 answers

PHP exec() vs system() vs passthru()

What are the differences? Is there a specific situation or reason for each function? If yes, can you give some examples of those situations? PHP.net says that they are used to execute external programs. see reference From the examples I see, I don't…
codingbear
  • 13,753
  • 20
  • 44
  • 64
292
votes
19 answers

cocoapods - 'pod install' takes forever

I was trying to update the existing pods with the pod install command, but it takes forever to run. The verbose mode shows it was stuck at the following line (forever) Updating spec repo master $ /usr/bin/git pull --no-rebase --no-commit There is…
Hai Feng Kao
  • 4,799
  • 2
  • 24
  • 37
282
votes
7 answers

Git alias with positional parameters

Basically I'm trying to alias: git files 9fa3 ...to execute the command: git diff --name-status 9fa3^ 9fa3 but git doesn't appear to pass positional parameters to the alias command. I have tried: [alias] files = "!git diff --name-status $1^…
user400575
  • 2,995
  • 2
  • 13
  • 10
273
votes
6 answers

How can you run a command in bash over and over until success?

I have a script and want to ask the user for some information, but the script cannot continue until the user fills in this information. The following is my attempt at putting a command into a loop to achieve this but it doesn't work for some…
J V
  • 9,736
  • 7
  • 41
  • 64
264
votes
11 answers

What is the alternative for ~ (user's home directory) on Windows command prompt?

I'm trying to use the command prompt to move some files, I am used to the linux terminal where I use ~ to specify the my home directory I've looked everywhere but I couldn't seem to find it for windows command prompt (Documents and Settings\[user])
fenerlitk
  • 4,364
  • 9
  • 26
  • 37
1
2 3
99 100