LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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,254

Rep: Reputation: 314Reputation: 314Reputation: 314Reputation: 314
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: Centos 6.9, Centos 7.3
Posts: 17,374

Rep: Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383
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 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
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: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960
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 03:47 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration