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
14
votes
3 answers

Print directory tree but exclude a folder on windows cmd

I want to print a directory tree excluding a folder. I already know the basic way to print the tree like this: tree /A > tree.txt I want to achieve something like this: tree /A [exclude folder node_modules] > tree.txt
edmamerto
  • 7,605
  • 11
  • 42
  • 66
14
votes
6 answers

How do i test the net speed from the command-line on a linux server(no gui)?

I am looking for ways to test the net speed on a linux box with no GUI from the command line. I am not interested in tools like bmon/iftop/wget/curl especially from the upload side of things, for download it is pretty easy with wget on different…
Shinnok
  • 6,279
  • 6
  • 31
  • 44
14
votes
5 answers

Testing console based applications/programs - Java

All, I have written a PhoneBook application in Java that is command line based. The application basically asks for some details of user like Name, Age, Address and phone numbers and stores them in a file. Other operations involve looking up…
name_masked
  • 9,544
  • 41
  • 118
  • 172
14
votes
2 answers

How do you write comments in doskey macro files?

I have inherited a beautiful mess of doskey macros, and is trying to sort them by areas of concern. So far I haven't been able to find any references that mention comments in any way, but this seems such a common scenario that I'd be surprised if it…
Haugholt
  • 837
  • 9
  • 15
14
votes
1 answer

mysql expanded output

I'm coming from postgresql to mysql, curious if mysql has an expanded output flag similar to that of postgresql? ie: in psql I could \x to get expanded output id | name ---+----- 1 | foo into -[ Record ]------ id | 1 name | foo how can I do…
veilig
  • 5,085
  • 10
  • 48
  • 86
14
votes
3 answers

Accepting negative doubles with boost::program_options

I need to be able to have boost::program_options parse an array of doubles that are passed on a command line. For positive doubles, this is no problem, of course (use multitoken with std::vector in add_options), but for negative ones, I know…
Howard Butler
  • 243
  • 2
  • 7
14
votes
3 answers

How to create a file with its name starting with dash in Linux? (ex "-file")

How can I create a file named "-file" using command line in Linux?
sebthesaviour
  • 153
  • 1
  • 1
  • 6
14
votes
1 answer

Create a function to check for key press in Unix using ncurses

I have been looking for an equivalent to kbhit() and I have read several forums on this subject, and the majority seem to suggest using ncurses. How should I go about checking if a key is pressed in C++ using ncurses? The function getch() provided…
Mimsy Jack
  • 163
  • 1
  • 2
  • 6
14
votes
5 answers

How to invoke groovy with 'java' from command line

I have to ship some groovy code to some users that have only java installed (no grooy, no $groovy_home, etc). I'm trying to invoke groovy from the commandline but I'm having no luck. Here's my bat file: java -classpath .;lib;bin;bin-groovy…
Miguel Ping
  • 18,082
  • 23
  • 88
  • 136
14
votes
7 answers

Compiling multiple packages using the command line in Java

Hi i have been using an IDE but now I need to run and compile from the command line. The problem is that I have multiple packages and I have tried to find the answer but nothing has worked. So I have src/ Support/ (.java files) Me/ (.java…
Altober
  • 956
  • 2
  • 14
  • 28
14
votes
4 answers

How to compile sass / scss without creating map files

I went looking for this answer and noticed it is not yet on Stack Overflow. So I hope to share this knowledge for anyone in need. Situation: In the command line: compiling compressed SASS files from the scss folder into the css folder. sass --watch…
Willow
  • 1,040
  • 2
  • 10
  • 21
14
votes
1 answer

How to use PyCharm as a GIT diff tool from the command line?

On the PyCharm Help Website I see you can use PyCharm as a diff tool from the Command Line to compare two files. That's awesome! However is there a way to take it a step further and use it as a git diff tool. So I can just type pycharm diff…
Dimo
  • 467
  • 6
  • 13
14
votes
2 answers

Yes to all overwrites in interactive mv/cp/rm?

So I've aliased the commands rm/cp/mv to use interactive (-i) mode by default to avoid accidentally deleting things, but sometimes this is pretty inconvenient. I would like to be able to say 'y' to all the prompts of the form: mv: overwrite…
capybaralet
  • 1,757
  • 3
  • 21
  • 31
14
votes
5 answers

Wpf and commandline app in the same executable

I would like to have a single executable file that I can use to either open a graphical app (the default use case, when clicking on the .exe), or that I can use to run command line tasks. Is this possible? If so, how would I have to modify my…
Wilbert
  • 7,251
  • 6
  • 51
  • 91
14
votes
5 answers

How to list recently deleted files from a directory?

I'm not even sure if this is easily possible, but I would like to list the files that were recently deleted from a directory, recursively if possible. I'm looking for a solution that does not require the creation of a temporary file containing a…
Marco Roy
  • 4,004
  • 7
  • 34
  • 50