Top "Command-line" questions

A command line is a string given to a command interpreter that tells it actions to take, such as running programs or copying files.

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?

unit-testing command-line junit
Remove the last line from a file in Bash

I have a file, foo.txt, containing the following lines: a b c I want a simple command that results …

bash command-line scripting truncate
xcopy file, rename, suppress "Does xxx specify a file name..." message

This seems pretty simple and maybe I'm just overlooking the proper flag, but how would I, in one command, copy …

command-line command-prompt xcopy
How to execute Python scripts in Windows?

I have a simple script blah.py (using Python 2): import sys print sys.argv[1] If I execute my script by: …

python windows scripting command-line file-association
How to use sed to replace only the first occurrence in a file?

I would like to update a large number of C++ source files with an extra include directive before any existing #…

command-line sed text-processing
How can I reverse the order of lines in a file?

I'd like to reverse the order of lines in a text file (or stdin), preserving the contents of each line. …

shell unix command-line
Mysql: Setup the format of DATETIME to 'DD-MM-YYYY HH:MM:SS' when creating a table

After googling around, I cannot find a way to create a new table with a DATETIME column with the default …

mysql datetime command-line format create-table
How to do a simple file search in cmd

I want to quickly search for a file given its name or part of its name, from the windows command …

windows command-line cmd
How to pass command line arguments to a rake task

I have a rake task that needs to insert a value into multiple databases. I'd like to pass this value …

ruby command-line rake command-line-arguments