LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 03-12-2012, 05:32 PM   #1
josecolella
Member
 
Registered: Nov 2010
Location: Milan, Italy
Distribution: Linux Mint 13, Debian 6.0
Posts: 62

Rep: Reputation: 3
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?...
 
Old 03-12-2012, 05:50 PM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
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".
 
Old 03-13-2012, 12:01 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,355

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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/
 
Old 03-13-2012, 05:47 AM   #4
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by josecolella View Post
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
 
Old 03-13-2012, 02:44 PM   #5
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Quote:
Originally Posted by eSelix View Post
...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.
 
Old 03-14-2012, 03:06 AM   #6
josecolella
Member
 
Registered: Nov 2010
Location: Milan, Italy
Distribution: Linux Mint 13, Debian 6.0
Posts: 62

Original Poster
Rep: Reputation: 3
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...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] About the -print option in find command the_gripmaster Linux - Newbie 3 11-06-2011 01:15 PM
problem - how to find package if you only know specific command? markomarko Linux - Newbie 3 08-05-2009 02:21 PM
mtime option in find command ahmedb72 Linux - Newbie 7 06-23-2009 09:48 AM
Use the prune option in find command frznchckn Linux - General 1 06-06-2007 07:18 PM
du on specific files from find command (use xargs?) fireman949 Linux - Software 2 07-10-2005 01:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration