DELAPARRA
Index
Color
NL
Category: CLI flags

-o, --output (Output)

Explained by Updated

What is -o, --output (Output)?

-o, --output (Output): Specify where the command should write its output — a file, a format, or a directory. -o or --output tells a command where to write its result, or in what form. curl -o page.html saves the response to a file. gcc -o app names the compiled program. kubectl get pods -o yaml changes the output format.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about -o, --output (Output)

How is -o, --output (Output) used in practice?

Without it, most tools print to the screen. That is fine for a quick look, but you lose the result once the terminal scrolls. Writing to a file means you can compare two runs, attach the result to a ticket, or feed it into the next step.

What should you keep in mind with -o, --output (Output)?

The format variant is especially useful. -o json gives you something a script can read reliably, while the default table output is meant for people and can change between versions. If you are parsing a command's output in a script, ask for a structured format instead of cutting columns out of text.

At a glance

CategoryCLI flags
Explained by
Updated

More CLI flags terms

All terms starting with a number or symbol

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.