Issue
I'm new to the Linux terminal and a lot of commands use the -o
option in them.
For example, to compile a rel="nofollow noreferrer">NASM program, you say
gcc prgram1.o -o prgram1
I can guess that it has something to do with output, but what is a proper definition and intuition for when it is used?
P.S.: I did a lot of googling and found a lot of pages with command references for Linux terminal, but nothing that covered the simple -o
.
Solution
In most cases, -o will stand for output, but it's not a defined standard. It can potentially mean anything the developer wanted it to mean.
The only way someone can know which commands is to use a command line option of --help, -h, or something -? to display a simple list of commands. Again because the developer of the program chooses the possible input arguments and their meaning might differ from program to program.
The safest way to know is typically to run
man gcc
replacing the second part with the program name you want.
man <program name>
This lists a full guide for the program with a lot more detail and is usually well formatted to read on a terminal. Just press Q when you’re finished reading it.
Answered By - Peter Fox Answer Checked By - Mildred Charles (WPSolving Admin)