Questions tagged [command-line]

A command line is a string given to a command interpreter that tells it actions to take, such as running programs or copying files. The interpreter processes command lines with escapes and substitutions.

A command-line interface () is a mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks. This text-only interface contrasts with the use of a mouse pointer with a graphical user interface (GUI) to click on options, or menus on a text user interface (TUI) to select options.

This method of instructing a computer to perform a given task is referred to as entering a command. The system waits for the user to conclude the submitting of the text command by pressing the Enter key (a descendant of the carriage return key of a typewriter keyboard). A command-line interpreter then receives, parses, and executes the requested user command. The command-line interpreter may be run in a text terminal or in a terminal emulator window as a remote shell client such as .

Upon completion, the command usually returns output to the user in the form of text lines on the CLI.

Related tag:

See also: Wikipedia Command-line_interface.

23435 questions
443
votes
16 answers

How to exit a 'git status' list in a terminal?

How can I exit a terminal listing mode generated by the git status command?
Luis Martins
  • 4,589
  • 3
  • 17
  • 6
442
votes
23 answers

Run cURL commands from Windows console

Is there a way to install cURL in Windows in order to run cURL commands from the command prompt?
DomingoSL
  • 14,920
  • 24
  • 99
  • 173
416
votes
21 answers

How do I get the name of the current executable in C#?

I want to get the name of the currently running program, that is the executable name of the program. In C/C++ you get it from args[0].
Joakim
  • 11,468
  • 9
  • 44
  • 50
415
votes
9 answers

POST XML file using cURL command line

How can I POST an XML file to a local server http://localhost:8080 using cURL from the command line? What command should I use?
Arnab Sen Gupta
  • 5,639
  • 5
  • 24
  • 17
409
votes
28 answers

How can I generate a list of files with their absolute path in Linux?

I am writing a shell script that takes file paths as input. For this reason, I need to generate recursive file listings with full paths. For example, the file bar has the path: /home/ken/foo/bar but, as far as I can see, both ls and find only give…
Ken
  • 77,016
  • 30
  • 84
  • 101
397
votes
10 answers

How to run JUnit test cases from the command line

I would like to run JUnit test cases from the command line. How can I do this?
KK.
  • 4,137
  • 2
  • 18
  • 11
397
votes
18 answers

View tabular file such as CSV from command line

Anyone know of a command-line CSV viewer for Linux/OS X? I'm thinking of something like less but that spaces out the columns in a more readable way. (I'd be fine with opening it with OpenOffice Calc or Excel, but that's way too overpowered for…
Benjamin Oakes
  • 12,262
  • 12
  • 65
  • 83
390
votes
10 answers

How to checkout a specific Subversion revision from the command line?

I want to checkout a specific revision of a folder in Subversion using the command line. I don't see an option for specifying the revision number in TortoiseProc.exe, TortoiseProc.exe /command:checkout How do I get the revision I want? Is…
ranja
385
votes
19 answers

How to find which version of TensorFlow is installed in my system?

I need to find which version of TensorFlow I have installed. I'm using Ubuntu 16.04 Long Term Support.
Hans K
  • 4,153
  • 2
  • 13
  • 19
369
votes
15 answers

Downloading MySQL dump from command line

I am moving away from Linode because I don't have the Linux sysadmin skills necessary; before I complete the transition to a more noob-friendly service, I need to download the contents of a MySQL database. Is there a way I can do this from the…
Phillip Copley
  • 4,238
  • 4
  • 21
  • 38
369
votes
7 answers

Maven command to determine which settings.xml file Maven is using

How do I use maven command line to determine which settings.xml file Maven is picking up?
harschware
  • 13,006
  • 17
  • 55
  • 87
364
votes
12 answers

How to use arguments from previous command?

I know that Esc + . gives you the last argument of the last command. But I'm interested in first argument of the last command. Is there a key binding to do so? On the same lines, is there a generic way of getting the nth argument from the last…
Aman Jain
  • 10,927
  • 15
  • 50
  • 63
363
votes
12 answers

How to best display in Terminal a MySQL SELECT returning too many fields?

I'm using PuTTY to run: mysql> SELECT * FROM sometable; sometable has many fields and this results in many columns trying to be displayed in the terminal. The fields wrap onto the next line so it is very hard to line up column titles with field…
Chris Jacob
  • 11,878
  • 7
  • 47
  • 42
363
votes
21 answers

Python not working in the command line of git bash

Python will not run in git bash (Windows). When I type python in the command line, it takes me to a blank line without saying that it has entered python 2.7.10 like its does in Powershell. It doesn't give me an error message, but python just doesn't…
Caroline Morris
  • 3,631
  • 3
  • 10
  • 5
357
votes
11 answers

Is there a "standard" format for command line/shell help text?

If not, is there a de facto standard? Basically I'm writing a command line help text like so: usage: app_name [options] required_input required_input2 options: -a, --argument Does something -b required Does something with…
Yifan
  • 4,867
  • 5
  • 25
  • 24