LinuxQuestions.org
Register a domain and help support LQ
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 12-09-2009, 05:48 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,225

Rep: Reputation: 49
I can know the length in lines of a man page but not of an info manual.


Hi:
I want to read the info manual of the latex program ('info latex') but I suspect it may be huge. To see the file length of the corresponding file isn't of much use, I think.
On the contrary, doing 'man cdrecord', for instance, I instantly get the number of lines.

What happens is that if I see the info manual is very large, I'll try to read some tutor or guide. But if the info were little enoough, I would gladly read it. The use I intend to to make of latex does not justify becoming an expert (only writing some little math expressions.

Suppose the name of the info file is foo.gz. Is it easy to find the relation between the number of lines (assuming say 70 chars per line) and size in bytes of foo.gz? The problem is made worse by the fact that info files contains many blank lines.

Any hint will be welcome. Thanks in advance.
 
Old 12-09-2009, 07:21 PM   #2
hunternet93
Member
 
Registered: Jun 2009
Posts: 87

Rep: Reputation: 31
LaTeX is a complex program, I believe. I'd find a tutorial online if I were you. As to finding the length, the simplest way would be to just start reading it and if it is really long don't bother with it. But, to see the size of a file (which if it is a text file then it will equal the amount of characters as 1 char = 1 byte) use the du command. "du" stands for Disk Usage, it tells the size of a file or all the files in a folder. For example:

Code:
blah@blah:~$ du somefile.txt
34    somefile.txt
blah@blah:~$ du somefolder/
27       someotherfile.txt
9743     yetanotherfile.jpg
99999    kindabigfile.zip
blah@blah:~$ du hugefile.iso
2365943  hugefile.iso
blah@blah:~$ du -h hugefile.iso
1.9M     hugefile.iso
Hope this helps!
 
Old 12-10-2009, 01:40 AM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,225

Original Poster
Rep: Reputation: 49
Well. I've found a tutorial (Latex 2e in 141 minutes). As for the info file, its tree has so many levels and so many nodes within each level that it is impossible to get an appreciation of the real size once it is formatted for reading.

As for 'du' (or ls for that case), an info file is generally a compressed one, although I think it is left uncompressed somewhere on the hard disk after the first time it has been read.

As a separate matter, I'm unable to find the info, I do 'info latex' and there it is. Therefore the info file for latex should be somewhere on the hard disk. If I could know the name of the package where it belongs, then I would read the file /var/log/packages/<package-name-minus-the-extension> and look for the string 'info'. That would give me the exact location.

What I do in cases like this one, is 'grep -irl <program-name> /var/log/packages', and so I find the package name (in this case program-name is latex). But with latex this technique has failed. The output of 'grep -irl latex' is almost a screenful. However, using find, I know the exact path of latex. It ends in /bin/latex. But when I grep with this path ('grep -irl latex bin/latex') the output is
empty (grep doesn't return anything). It's a mystery. Well, good bye and thanks.

Enrique.
 
Old 12-10-2009, 03:41 AM   #4
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,225

Original Poster
Rep: Reputation: 49
Problem solved.

In order to have an apreciation of how much time it'll take me to read an info manual, I did this:

Let us say you type 'info latex' when you want to read the manual. The info file is '/usr/info/latex.info.gz' and it's easy to find its name and location. Now, all I have to do is

$ cp /usr/info/latex.info.gz ./
$ gzip latex.info.gz
$ ls -lh latex.info
$ blah..........blah latex.info
$

And I now have all the doc which was accessible by the command 'info latex' gathered into one and only one file. To see the number of lines, do 'less latex.info', go to the bottom of the file and read the number of lines less displays, in this case 4286. You can multiply by a factor between 0.90 and 0.95 due to the existence of the links and some LaTex commands. That's all. Regards.
 
  


Reply

Tags
info, man


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
question about man(manual) ! shipon_97 Linux - Newbie 3 09-30-2009 08:54 PM
"info ls" shows man page instead of info page lorenz Slackware 8 09-21-2007 09:47 PM
info <program> just gives me the man page Robhogg Ubuntu 1 10-17-2006 02:25 PM
man alsamixer not showing the man page nosaku Slackware 1 12-20-2004 09:52 AM
How to quit man (less) and keep man info on screen? peb Linux - Newbie 7 03-25-2004 11:02 PM


All times are GMT -5. The time now is 01:41 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration