Skip to content

Command-line Interfaces

Published On:
Jan 21, 2014
Last Updated:
Jan 21, 2014

A command-line interface is a way of interacting (sending instructions, receiving info) with programs on a computer.

See C->Processing Command-Line Input for how to write C code for dealing with command-line arguments passed to main().

Related is the page C#->Redirecting The Command-line To A Text Block.

Command Description (Help) Syntax

  • Angled brackets for required parameters, e.g. cd <dir name>.
  • Square brackets for optional parameters, e.g. ls [-a].
  • Ellipses for repeated items, e.g. cp <source1> [source2...].
  • Vertical bars and curly braces when there is a choice of items (logical or), e.g. netstat {-t|-u}.