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 can I pretty-print JSON in a shell script?

Is there a (Unix) shell script to format JSON in human-readable form? Basically, I want it to transform the following: { "…

json unix command-line format pretty-print
How to create an empty file at the command line in Windows?

How to create an empty file at the DOS/Windows command-line? I tried: copy nul > file.txt but it …

windows file cmd command-line
How to change the output color of echo in Linux

I am trying to print a text in the terminal using echo command. I want to print the text in …

linux bash command-line echo terminal-color
How to force cp to overwrite without confirmation

I'm trying to use the cp command and force an overwrite. I have tried cp -rf /foo/* /bar, but I …

linux command-line overwrite cp
Including all the jars in a directory within the Java classpath

Is there a way to include all the jar files within a directory in the classpath? I'm trying java -classpath …

java command-line classpath
Command to list all files in a folder as well as sub-folders in windows

I tried searching for a command that could list all the file in a directory as well as subfolders using …

windows command-line command dir
Run Command Prompt Commands

Is there any way to run command prompt commands from within a C# application? If so how would I do …

c# .net command-line command prompt
How do I run two commands in one line in Windows CMD?

I want to run two commands in a Windows CMD console. In Linux I would do it like this touch …

windows batch-file command-line cmd
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 …

linux command-line absolute-path ls
How can you find and replace text in a file using the Windows command-line environment?

I am writing a batch file script using Windows command-line environment and want to change each occurrence of some text …

windows command-line scripting batch-file text-files