LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   difference between "man" and "info" (http://www.linuxquestions.org/questions/linux-newbie-8/difference-between-man-and-info-571775/)

gexecuter 07-24-2007 12:22 AM

difference between "man" and "info"
 
so i am starting to learn the terminal commands and i am wondering what is the difference between "man" and info", they both provide information but i am not sure what is the difference between them.

macemoneta 07-24-2007 01:29 AM

It's like the vi vs. emacs wars. Some folks prefer the 'man' tool, some prefer the 'info' tool. Two camps, two sets of information.

PatrickNew 07-24-2007 01:33 AM

Quote:

Originally Posted by macemoneta
Two camps, two sets of information.

Actually, I've discovered that in a surprising number of instances, the info page is a direct copy of the man page. man is the good old standby that is relatively likely to be on any given Linux machine, whereas info imho makes it easier to find what you're looking for when you don't know what you're looking for. That is, if I want information on socket(), I would do "man 2 socket". But if I wanted some kind of IPC, but didn't know anything about IPC, info may be more useful. All just opinions tho. man has tools for doing things like that, I just prefer info's.

macemoneta 07-24-2007 01:39 AM

Yes, the "innocent bystanders" typically replicate data or simply point from one to the other. Then there's the third camp, the '/usr/share/doc/' folks that refuse to format their documentation for either tool... :)

jschiwal 07-24-2007 01:41 AM

The man pages will be shorter then the info pages. They will give the syntax and options. They are written using nroff source. Info documents have links to allow you to navigate to different parts of the document. Some have a very large number of pages. For example, compare man gawk with info gawk. The gawk info manual is a book "GAWK: Effective Awk Programming".

The info pages use docbook source. Often you can access the source be installing the source package, and using the "make dvi", "make pdf" or "make ps" targets. For manpages you can use "man -t <topic> | lpr" for a better looking printed document.

---

If an info page doesn't exist, the manpage will be displayed instead. The GNU pushes using info pages instead of (or at least in addition to) man pages, but manpages are easier to write from a template.

PatrickNew 07-24-2007 01:51 AM

Quote:

Originally Posted by jschiwal
If an info page doesn't exist, the manpage will be displayed instead. The GNU pushes using info pages instead of (or at least in addition to) man pages, but manpages are easier to write from a template.

I didn't know that. That would explain why some info pages seem to be exact copies of the man pages - because I didn't download an info doc for it, so it's showing the manpage.

Learn something new every day.

b0uncer 07-24-2007 02:18 AM

Quote:

Originally Posted by PatrickNew
Learn something new every day.

We do.

man-pages are the "original" UNIX manual pages. Info-pages are a newer system, which I never quite got to like. Everything needed and a lot more is included in the manual pages (man), whereas the same information plus a whole lot more you are never going to read is in the infopages. It's a matter of taste, I personally like manpages and don't have the info system installed. If I want more or more precise information than man can offer, I go to the store and buy a good book..

I also tend to think man-pages are easier to read and use. Info pages are split up (you'll have a front page and a hundred links..grr) so it means a whole lot of looking for links, going back and looking for correct links before getting to the point. In man-pages I simply
Code:

man -k keyword
man [ n ] pagename

and then hit / and start searching.

gexecuter 07-25-2007 12:13 AM

thanks guys

kaz2100 07-27-2007 06:03 PM

Hi,

Does anybody know how to read document from all sections using info?
Code:

man -a printf
gives us documents from section 1 and 3 on my penguin. "info printf" gives me only section 1. "info info" and "man info" are not quite helpful to solve this.

Happy Penguins!

archtoad6 09-23-2007 05:23 PM

Tips for info haters
 
Tips for info haters, & I'm one of you:

1st, if you have KDE, use the "info:" kioslave by entering "info:<name_of_program>" as a URL in Konqueror, it will convert the info pages into html, complete w/ clickable links. This makes the info multiple-page-BS almost bearable, especially w/ the use of tabbed browsing. "##<name_of_program>" also works.

If I didn't have the kioslave available, I would consider removing info from my system.


2nd, the documentation (i.e. info pages) for GNU programs is available on-line at: http://www.gnu.org/manual/manual.html
Many of these, like GRUB, gawk, & bash, have an "entirely on one web page" version. I find these versions especially convenient because you can search the whole document at once.

oskar 09-23-2007 08:00 PM

I don't mean to hijack this thread, but do you ever use them? I've been using linux for quite a long time, but I never understood man pages. What makes them so hard to use for me is that they aren't very practical. They don't give you examples and the options are in no particularly useful order most of the time. And the descreption is often very vague, or something like
Code:

-g --great-option
    same as -dmfgsrx

Usually I'm faster if I use google/linux than if I look into the manpages.

macemoneta 09-23-2007 08:17 PM

I've been using Linux on many systems since the mid 1990s, and I reference man pages several times a day. They frequently have examples, and I don't find them difficult to read at all (never have). I have a computer/technical background, so that likely skews my response.

I'd suggest that, like anything, the more experience you have using them, the easier it gets. I doubt most people could read the technical documentation (e.g., service manuals) for their cars either without some initial effort.

matrix13 09-24-2007 02:01 AM

try this...
at terminal

Quote:

#man man
and
Quote:

man info

oskar 09-24-2007 03:03 AM

don't forget
Code:

$ info man
and
Code:

info info
!

shailesh2000 09-24-2007 03:05 AM

hi
 
Quote:

Originally Posted by gexecuter (Post 2834513)
so i am starting to learn the terminal commands and i am wondering what is the difference between "man" and info", they both provide information but i am not sure what is the difference between them.

hi,
man gives the full information with all types of flag, which are generally not required in everyday task.

shailesh vaidya


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