LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-10-2007, 10:13 AM   #1
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Rep: Reputation: 30
Smile how to use man pages


hi
There are many options for a command in man pages .some options come inside [] and some with extensions - or -- .is it necessary to use the first occuring option before using the next.
thanks
 
Old 10-10-2007, 10:28 AM   #2
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
I usually read a man page and then search Google for examples if I'm still unsure of how a command should be issued.

man grep
examples using grep

A bit of creative searching on Google will usually clear up your questions on a command enough to get you moving.

If you are into books at all, one I might recommend for you is theLinux Phrasebook It's chock full of commands and examples of how they are used indexed by task rather than just the name of the command which you may not know... A compact reference that is reasonably priced. Google books has an excerpt from this book


just remember the more difficult of items still don't have manuals, you'll have to figure out those items on your own..
Quote:
username@it-etch:/var/www$ man woman
No manual entry for woman
 
Old 10-10-2007, 10:48 AM   #3
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 67
Quote:
Originally Posted by babu198649 View Post
some options come inside []
That means they are not required, but optional.

Quote:
Originally Posted by babu198649 View Post
and some with extensions - or -- .
The single - before a single character option is the original unix style. Often with this style of option you an "bundle" options together too, for example, these two variations do the same thing - the second is with bundling:
Code:
grep -i -v
grep -iv
The more recent convention of using --long-options is described in detail in the GNU coding standards document. One of the reasons for adopting this style was to improve readability and memorability of options. It's easy to get confused between a --long-option and short-option bundling. If a program supports both, you might find something where all the following do the same thing:
Code:
program --verbose --yes
program --verbose -y
program -v --yes
program -v -y
program -vy
Note that the --yes is distinguishable from -yes only by the double hyphen. -yes would presumably be interpreted as a bundled version of -y -e -s, if those options existed.

Quote:
Originally Posted by babu198649 View Post
is it necessary to use the first occuring option before using the next.
Generally not for options. For arguments which are not options (i.e. do not have a - or -- at the start) the order often is important. For example, the cp (file copy) command, these two commands do the same thing:
Code:
cp -i -p somefile anotherfile
cp -p -i somefile anotherfile
But these two commands do a different thing - one which you probably don't want to get wrong:
Code:
cp -i -p somefile anotherfile
cp -i -p anotherfile somefile
Processing the command line options is the job of the program itself, and as such it is the responsibility of the programmer to do so in a manner which is consistent with other programs. There is the odd program which breaks the accepted conventions. In my experience these tend to be the same ones that do not provide manual pages, or other good documentation, and they are often annoying to use.

Last edited by matthewg42; 10-10-2007 at 10:51 AM.
 
Old 10-10-2007, 12:02 PM   #4
whk
Member
 
Registered: Jun 2005
Posts: 202

Rep: Reputation: 37
BTW, peruse less on how to navigate through out man.
$ man less
 
Old 10-10-2007, 12:12 PM   #5
baikonur
Member
 
Registered: Oct 2005
Location: germany
Distribution: debian
Posts: 255
Blog Entries: 5

Rep: Reputation: 30
another nice.to.know:
Code:
man -k sex
to search for man pages about programs that have anything to do with sex.
 
Old 10-10-2007, 12:24 PM   #6
Pau Gasol
Member
 
Registered: Jan 2006
Distribution: Debian Lenny, Slackware 12
Posts: 33

Rep: Reputation: 15
Another "linux Phrasebook" recomendation here

You can get the book cheap and it really shows you some command line key commands. Nice job by the writer.
 
Old 10-11-2007, 01:13 AM   #7
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
Smile to farslayer

Thank you very much farslayer for u r quick response .actually this is my first question and i never expected sucha a quick replay.

Last edited by babu198649; 10-11-2007 at 01:21 AM. Reason: icon not added
 
Old 10-11-2007, 01:20 AM   #8
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
Smile to matthewg42

hi matthewg42 thanks for u r detailed explanation .the greatest thing u have done regarding my question is u have understood perfectly what i wanted to say.
Also u have mentioned about GNU coding standards document .can u tell me where can i find them.
 
Old 10-11-2007, 07:28 AM   #9
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 67
Quote:
Originally Posted by babu198649 View Post
hi matthewg42 thanks for u r detailed explanation .the greatest thing u have done regarding my question is u have understood perfectly what i wanted to say.
Also u have mentioned about GNU coding standards document .can u tell me where can i find them.
The section you want is here.
 
Old 10-11-2007, 08:09 AM   #10
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
thanks again

one more question.i am using fedora.i want to know about the version and using the following command i got the result below .why there is no information regarding fedora.


uname -a
Linux localhost.localdomain 2.6.21-1.3194.fc7 #1 SMP Wed May 23 22:47:07 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
 
Old 10-11-2007, 08:19 AM   #11
baikonur
Member
 
Registered: Oct 2005
Location: germany
Distribution: debian
Posts: 255
Blog Entries: 5

Rep: Reputation: 30
Code:
man uname
 
Old 10-11-2007, 08:27 AM   #12
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
A nice way to read man pages is to enter "man:topic" in konqueror. Sometimes you might want a hardcopy printout: man -t topic | lpr
 
Old 10-11-2007, 11:28 AM   #13
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 67
Quote:
Originally Posted by jschiwal View Post
A nice way to read man pages is to enter "man:topic" in konqueror. Sometimes you might want a hardcopy printout: man -t topic | lpr
Wow, I didn't know that about konqueror. Is there anything it doesn't do?!
 
Old 10-11-2007, 11:41 AM   #14
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by babu198649 View Post
one more question.i am using fedora.i want to know about the version
Code:
cat /etc/fedora-release
 
Old 10-12-2007, 03:14 AM   #15
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,415

Rep: Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785
That uname output finishes with 'fc7' => fedora core 7
 
  


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
C++ man pages Guest1234 Linux - Newbie 2 06-29-2008 10:12 AM
LQ man pages simcox1 LQ Suggestions & Feedback 1 08-06-2006 10:25 AM
who - man pages kshkid Programming 17 03-01-2006 03:37 AM
man pages q. jnusa Linux - Software 6 02-03-2006 09:40 AM
C man pages sono2 Programming 4 09-12-2005 02:24 AM

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

All times are GMT -5. The time now is 01:06 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
Open Source Consulting | Domain Registration