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.
Practical Task Scheduling Deployment
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.View Now!
|The Firebird Project's Firebird Relational Database||Jul 29, 2016|
|Stunnel Security for Oracle||Jul 28, 2016|
|SUSE LLC's SUSE Manager||Jul 21, 2016|
|My +1 Sword of Productivity||Jul 20, 2016|
|Non-Linux FOSS: Caffeine!||Jul 19, 2016|
|Murat Yener and Onur Dundar's Expert Android Studio (Wrox)||Jul 18, 2016|
- Stunnel Security for Oracle
- The Firebird Project's Firebird Relational Database
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- SUSE LLC's SUSE Manager
- Managing Linux Using Puppet
- My +1 Sword of Productivity
- Non-Linux FOSS: Caffeine!
- Google's SwiftShader Released
- Doing for User Space What We Did for Kernel Space
- SuperTuxKart 0.9.2 Released
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide