Questions tagged [command-line-interface]

The interface to a program that consists entirely of text, as opposed to (although not necessarily mutually exclusive to) a GUI, or Graphical User Interface.

A command line interface (CLI) is an interface to a program based on a series of typed text lines, called commands, which follow a specific language structure. The command lines are then interpreted by a Command Language Interpreter (more commonly known as a Shell).

The CLI was a popular interface since the 1960's, and even with development of more modern UI experiences such as , it is still a ubiquitous interface today. Depending on the specific command language, the CLI could provide a quicker and more accurate way to perform commands compared to alternatives.

Useful Resources

9389 questions
318
votes
12 answers

Delete node_modules folder recursively from a specified path using command line

I have multiple npm projects saved in a local directory. Now I want to take backup of my projects without the node_modules folder, as it is taking a lot of space and can also be retrieved any time using npm install. So, what would be a solution to…
Sumit
  • 3,652
  • 4
  • 13
  • 19
316
votes
15 answers

Is there a better Windows Console Window?

I find working on the command line in Windows frustrating, primarily because the console window is wretched to use compared to terminal applications on linux and OS X such as "rxvt", "xterm", or "Terminal". Major complaints: No standard…
Alana Storm
  • 164,128
  • 91
  • 395
  • 599
311
votes
6 answers

Skip download if files already exist in wget?

This is simplest example running wget: wget http://www.example.com/images/misc/pic.png but how to make wget skip download if pic.pngis already available?
nais inpoh gan
  • 3,159
  • 2
  • 15
  • 5
271
votes
19 answers

Switch php versions on commandline ubuntu 16.04

I have installed php 5.6 and and php 7.1 on my Ubuntu 16.04 I know with Apache as my web server, I can do a2enmod php5.6 #to enable php5 a2enmod php7.1 #to enable php7 When I disable php7.1 in Apache modules and enable php 5.6, Apache recognizes…
salimsaid
  • 3,186
  • 4
  • 15
  • 20
270
votes
2 answers

Is there a way to continue broken scp (secure copy) command process in Linux?

I am copying 7.5 GB file to a remote server using scp command. At some point in time file transfer breaks and I have to start all over again. Is the temporary amount of file being transferred completely lost ? Can I somehow restart the transfer from…
Matko
  • 3,386
  • 4
  • 21
  • 35
255
votes
10 answers

Command-line svn for Windows?

Is there a command-line based version of svn for Windows? I know I can get TortoiseSVN, but that just doesn't work for me.
Pieter
  • 31,619
  • 76
  • 167
  • 242
235
votes
7 answers

Linux equivalent of the Mac OS X "open" command

I've found the "open" command in Mac OS X very handy in the command line. From "man open": The open command opens a file (or a directory or URL), just as if you had double-clicked the file's icon. If no application name is specified, the …
Liu Chang
234
votes
21 answers

Docker - failed to compute cache key: not found - runs fine in Visual Studio

I've generated a Dockerfile with Visual Studio. It runs in Visual Studio just fine and now I'm trying to build it from Windows itself (docker build ., and I tried many combinations). Yet I get the following error: > [build 3/7] COPY…
231
votes
6 answers

Git commit in terminal opens VIM, but can't get back to terminal

Trying to learn GitHub at the moment and doing this Git essentials tutorial over at nettuts. I'm on the lesson about making commits. The teacher types git commit and it opens VIM as his editor (I'd also like to know how to make it open up in Sublime…
Leon Gaban
  • 36,509
  • 115
  • 332
  • 529
206
votes
6 answers

How to configure Mac OS X term so that git has color?

I've seen a Mac OS X git demo online in which it's configured to have multiple colors. For example, his prompt is amber, his ls directory is purple and his git diff output has ~ 4 colors (pink, light green, red, pale yellow). Can you tell me how can…
yinglcs
  • 2,363
  • 2
  • 16
  • 8
198
votes
15 answers

How do I avoid typing "git" at the begining of every Git command?

I'm wondering if there's a way to avoid having to type the word git at the beginning of every Git command. It would be nice if there was a way to use the git command only once in the beginning after opening a command prompt to get into "Git…
Nocturnal
  • 2,037
  • 2
  • 11
  • 14
185
votes
12 answers

Exiting from python Command Line

To exit from Python command line, I have to type exit(). If I type exit, it says Use exit() or Ctrl-Z plus Return to exit Usually when you type exit, you would want to exit the program. Why does the interpreter give me the above error when it…
Ank
  • 6,040
  • 22
  • 67
  • 100
180
votes
9 answers

Execute and get the output of a shell command in node.js

In a node.js, I'd like to find a way to obtain the output of a Unix terminal command. Is there any way to do this? function getCommandOutput(commandString){ // now how can I implement this function? // getCommandOutput("ls") should print the…
Anderson Green
  • 30,230
  • 67
  • 195
  • 328
169
votes
5 answers

What is the canonical way to determine commandline vs. http execution of a PHP script?

I have a PHP script that needs to determine if it's been executed via the command-line or via HTTP, primarily for output-formatting purposes. What's the canonical way of doing this? I had thought it was to inspect SERVER['argc'], but it turns out…
Bobby Jack
  • 15,689
  • 15
  • 65
  • 97
165
votes
25 answers

Docker push to AWS ECR hangs immediately and times out

I'm trying to push my first docker image to ECR. I've followed the steps provided by AWS and things seem to be going smoothly until the final push which immediately times out. Specifically, I pass my aws ecr credentials to docker and get a "login…
Jesse McMullen-Crummey
  • 3,175
  • 3
  • 8
  • 17