How to find what a specific option does with a command
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to find what a specific option does with a command
I have a quick question, I use the man pages a lot, and I was wondering whether there was a quick way to find what a specific option does with the command...example...lets say I'm programming in C and I want to use the -g command with gcc, instead of looking through the entire man file, is there a way to directly go to where I need?...
I think not, but you can use search ability of man, by pressing slash key "/" and entering regular expression to find. And for most programs there is a brief help after "--help" argument: "some_command --help".
If you also have access to a web browser, an HTML version is http://linux.die.net/man/, which is easier to search.
I'm sure there are other sites with that info, as well as specialist sites for eg gcc http://gcc.gnu.org/
I have a quick question, I use the man pages a lot, and I was wondering whether there was a quick way to find what a specific option does with the command...example...lets say I'm programming in C and I want to use the -g command with gcc, instead of looking through the entire man file, is there a way to directly go to where I need?...
If you don't want to go through the long list of man pages then you can try this
Code:
#gcc --help
it will list you the swicthes you can use with gcc with brief description
...but you can use search ability of man, by pressing slash key "/" and entering regular expression to find.
To be more specific, the search features are provided by the pager or text reader that displays the page, not the man command itself. On most distros this is less by default.
Thank you for your help, by the way when I mentioned the gcc, I just meant to show an example...with any command a quick way to find what an option does....Thank you all for your help...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.