Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Linux by (18.4k points)
edited by

I am new to the Linux Terminal and a lot of commands use the '-o' in it.

For example, to compile the NASM program you say

gcc prgram1.o -o prgram1

I can guess that it has something to do with output but can anyone provide me with the proper definition and intuition for when it is used?

P.S. I did a lot of Googling, I found many pages with command references for Linux terminal but nothing that covered the simple -o.

1 Answer

0 votes
by (36.8k points)

In most cases -o will stand for output but it's not the defined standard it can potentially mean anything the developer wanted it to mean, the only way someone can know which commands is to use the command line option is  --help, -h, or something -? to display the simple list of commands, again because the developer of the program chooses the possible input arguments and there meaning this might differ from program to program.

The safest way to know is typically the run

man gcc

Replacing this second part with a program name you want.

man <program name>

This lists the full guide for a program with more details and is usually well formated to read on the terminal. just press Q when your finished reading it.

Want to be a Linux expert? Come and join this linux course

Related questions

0 votes
1 answer
asked Dec 13, 2020 in Linux by blackindya (18.4k points)
0 votes
1 answer
asked Dec 23, 2020 in Linux by blackindya (18.4k points)
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...