Getting Help From Linux - Part 2 Info
Well here we are again, at part two of the 'Getting Help from Linux' series. In this blog post I'll be talking about using Info to get help from Linux. In my previous post I spoke about how Info came about, but just in case you missed it I'll give you another quick lesson. Gnu Info was created by the Free Software Foundation and in my experience is used by all of Gnu's software for their version of 'man' pages. Info may contain much more information than what you can find in Man pages, and sometimes contains much more than you ever really need. The good thing about Info is that it is a hypertext markup utility. This makes it much easier to navigate through via hyperlinks embedded in emacs, than simply using arrow keys to navigate through information. While Man uses the Less utility to control the display, the info utility itself is designed to display Info pages. For those of you familiar with emacs, it appears the layout may be the same, along with some of the basic navigation. But that's where the two applications can differ. If you're using the Info application then your commands will be different than if you're viewing info files in Emacs. This article is about reading Info pages inside of info.
Layout and Navigation
Okay, I won't lie, navigation in emacs makes my head spin. For some people this may come naturally, for those of us that have lived on vi all their lives the old adage 'you can't teach an old dog new tricks' really hits home when it comes to figuring out all of the emacs tips and tricks. If anyone has actually gone through gnu.org's website on the Texinfo manual you know what I'm talking about. The document on how to use Texinfo is 36 pages long, quite a bit longer than navigating Man pages in Less. As far as layout goes, sections are broken down into what Info considers 'nodes', so if you see the reference to nodes in here then that's what I'm talking about. As stated earlier, the info documents are written in hypertext, which makes it easier to navigate through than Man pages. When you first execute 'info <name>' you are presented with the index for the subject that you are looking for. Now before you start hyperventilating, think of the Info layout as a Tree (Top Node) with various branches spanning from the tree (Individual Nodes). The Branches just point back to the main 'branch'.
Before I get ahead of myself, let me first explain the main window.
At the bottom of your window is what is called the Mode Line. The mode line just describes what you are viewing above, including information about the file, the node, number of lines, compression information, etc. Here are some examples and explanations of Mode Lines:
zz-Info: (festival.info.gz)Top, 58 lines --Top-- Subfile:
*zz=Compressed file, Info=Using Info to Navigate, festival.info.gz=name of
compressed files, 58 lines=Number of lines in node, festival.info-1.gz=Subfile
containing more information
zz-Info: (screen.info.gz)Commands, 27 lines --All-- Subfile: screen.info-1.gz
*zz=Compressed file, Info=Using Info, screen.info.gz=name of compressed file,
27 lines=number of lines in node, screen.info-1.gz=Subfile containing more
This might be useful to some, especially if you want to get your hands on the info file for further analysis. When you first open the document, at the top of the document you will see something like this: File: festival.info, Node: Top, Up: (dir). File is festival.info, Node is Top, Up is main directory.
That takes care of the layout portion of Info, there are many more advanced layout portions that you can get into if you wish to explore this further, such as moving windows and texts, echo areas, and so on and so forth. But as this is just a basic guide to getting information with Info, I won't be covering that here. However, if you do want more information on this, some of your basic emacs commands work just as well in Info, so if you're familiar with emacs you
won't have a problem with windowing with your info pages
How about navigation? If you know how to navigate around vim or emacs then this will be a piece of cake. I haven't gone into the advanced topics of navigation for a reason. Advanced topics include windowing, manipulating windows, moving text in windows, and so on and so forth.
Below is a table that outlines your basic navigation. The 'C' character is your Ctrl key, and 'M' stands for Meta. For some people Meta is Alt, and for some it's the Esc key. So if a key binding calls for 'C-n' that would mean hold down your Ctrl key and push the letter n.
Next Line: C-n or <Down> arrow key
Previous Line: C-p or <Up> arrow key
Beginning of Line: C-a or <Home> key
End of Line: C-e or <End> key
Forward 1 Character: C-f or <Right> arrow key
Backward 1 Character: C-b or <Left> arrow key
Forward 1 Word: M-f or C-<Right> arrow key
Backward 1 Word: M-b or C-<Left> arrow key
Beginning of Node: M-<
End of Node: M->
End of Current Node: e Quit q
Next Node: n
Previous Node: p
Up a Node: u
Last Node Viewed: l
Top Node: t
Directory Node: d
First Node: <
Last Node: >
Global Next Node: ]
Global Previous Node: [
From this table you can see that Man navigation and Info navigation can both be navigated with arrow keys, but then there are added commands for moving around nodes. Keep in mind though, hypertext language is being used and there is a lot more information in Info pages than there are in Man pages. So because of this, there had to be a way of navigating the complex labyrinths of indexes.
Searching Info Pages
Well now that you've figured out how to get around Info pages, it's time to find what you're looking for. Just like with Man, you can do apropos searches from the command line to search every index of all Info files for keywords with: info --apropos=string , or info -x string. This will list all instances where the string is listed. Now what do you do once you're actually in the lengthly Info page and need to find information? Well there's an
app command for that!
Search Forward: s(string) or /(string)
Search Backwards: ?(string)
Search Case-Sensitive: S(string)
Next word in Search: n
Next word Case-Sensitive: N
Interactively Search Forwards: C-s(string)
Interactively Search Backwards: C-r(string)
Index Search: i(string)
Next Index Search: ,
As you can see, some of the search keywords are just like vim commands, so if you're familiar with Vim, this should be a piece of cake. One of the gems to searching Info was given to me by some resourceful people in #linuxjournal that were more educated in emacs than myself.. I'll confess, if you can't tell, I'm a beginner at emacs as I have spent my entire Linux career in vi. So it goes without saying that I'll take any and every hint that I can when it comes to learning new and interesting things. Daddoo pointed out that he jumps to a named node in info pages by doing the following:
1. m - Brings up Menu Item (info specific)
2. Type in First letter of what you are looking for 'ex' for example
3. Tab 1 or 2 times to search Info for the node you are looking for, then select the node to view the page
Maybe to you veteran emacs users out there this might seem trivial, but this ended up being such an awesome and easy command. Before I would just arrow key down to what I was looking for and push enter to bring up the node. Ah, the simple joys in life.
Well there you have it, the end of a two part series on getting help from Linux with Man/Info. As you can see each one of these utilities has their strengths and weaknesses. If I was a betting man I would think that more and more help pages are going to be included in Info pages as it contains more information than your typical Man page, and eventually manpages will be pointers to Info. Do I think that is going to happen any time soon? Doubtful, as I'm a crusty old bugger when it comes to Man Pages. I do realize that when that day comes I'll need plenty of time to adapt to Info and emacs.
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?
|Dynamic DNS—an Object Lesson in Problem Solving||May 21, 2013|
|Using Salt Stack and Vagrant for Drupal Development||May 20, 2013|
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
|Non-Linux FOSS: Seashore||May 10, 2013|
- Dynamic DNS—an Object Lesson in Problem Solving
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- Drupal Is a Framework: Why Everyone Needs to Understand This
- Validate an E-Mail Address with PHP, the Right Way
- A Topic for Discussion - Open Source Feature-Richness?
- New Products
- Download the Free Red Hat White Paper "Using an Open Source Framework to Catch the Bad Guy"
- The Secret Password Is...
3 hours 33 min ago
- Keeping track of IP address
5 hours 24 min ago
- Roll your own dynamic dns
10 hours 38 min ago
- Please correct the URL for Salt Stack's web site
13 hours 49 min ago
- Android is Linux -- why no better inter-operation
16 hours 5 min ago
- Connecting Android device to desktop Linux via USB
16 hours 33 min ago
- Find new cell phone and tablet pc
17 hours 31 min ago
19 hours 34 sec ago
- Automatically updating Guest Additions
20 hours 9 min ago
- I like your topic on android
20 hours 55 min ago