LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-21-2012, 03:09 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
Two manuals of the same program depending on who issues 'man'.


Kernel 2.6.21.5, Slackware 12.0

Hi:
When I am at a root console, 'man sox' shows me a 1240 lines manual. But in a regular user console, 'man sox' prints a 3472 lines manual. One is dated 2001 and the other, 2009. I have /var/log/packages/sox/14.3.1-i486-1 and there is the path of the manual (man page). This manual is the long one.

Now, Slack 12 came with sox 12.18.1. So, I must have installed 14.3.1 after having removepkg'd 12.18.1. Suppose the old manual was left behind on the hard disk. But how can man access one file in the root console and another one on the other console?

From any of the two consoles the program run when invoking is version 14.3.1.

Last edited by stf92; 04-21-2012 at 03:12 PM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 04-21-2012, 03:29 PM   #2
Nominal Animal
Senior Member
 
Registered: Dec 2010
Location: Finland
Distribution: Xubuntu, CentOS, LFS
Posts: 1,723
Blog Entries: 3

Rep: Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948
Most likely because one has MANPATH environment variable set, and the other does not, or they are set to different values.

You could check for the sox manpage locations using
Code:
find /usr/ -name 'sox.[1-9]*'
You can then check which one is which by using
Code:
man -l /path/to/man/page
the option being dash lowercase-L.
 
Old 04-21-2012, 03:48 PM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
I do not understand.
Code:
# find /usr/ -name 'sox.[0-9]*'
/usr/man/man1/sox.1.gz
Only one! And it is the new version, that is, that installed by me.
 
Old 04-21-2012, 04:00 PM   #4
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,770

Rep: Reputation: 1455Reputation: 1455Reputation: 1455Reputation: 1455Reputation: 1455Reputation: 1455Reputation: 1455Reputation: 1455Reputation: 1455Reputation: 1455
How about
Code:
# find /var/man -name 'sox.[0-9]*'

Last edited by Petri Kaukasoina; 04-21-2012 at 04:02 PM.
 
Old 04-21-2012, 04:26 PM   #5
gapan
Member
 
Registered: Feb 2007
Posts: 378

Rep: Reputation: 163Reputation: 163
Run
Code:
man -w sox
both as user and root. That will show you the location of the manpage that is used each time.
 
Old 04-21-2012, 04:26 PM   #6
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
There is one /var/man/cat1/sox.1.bz2. Unfortunately, the -l (lower case L) is not recognized by man.

Code:
root@darkstar:~# man -w sox
/usr/man/cat1/sox.1.bz2 (<-- /usr/man/man1/sox.1.gz)
root@darkstar:~# 

semoi@darkstar:~/mozart/Mozart - Symphonies 25, 28,29, 35, 39-40 - Bruno Walter/CD1$ man -w sox
/usr/man/man1/sox.1.gz

Last edited by stf92; 04-21-2012 at 04:31 PM.
 
Old 04-21-2012, 09:40 PM   #7
Nominal Animal
Senior Member
 
Registered: Dec 2010
Location: Finland
Distribution: Xubuntu, CentOS, LFS
Posts: 1,723
Blog Entries: 3

Rep: Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948
Does
Code:
MANPATH="" man sox
show the same man page when run as root, as when run as a normal user?

If it does, check what
Code:
echo "$MANPATH"
says.

You might also wish to show us what
Code:
find /root /usr /var /opt -name 'sox.[0-9]*' -ls
shows (when run as root), just in case you have some leftover sox manpages lying around elsewhere. They might be only readable by root.
 
Old 04-21-2012, 09:53 PM   #8
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Unfortunately, I had already removed /var/man/cat/sox.1.bz2, the old man page. So, now, the two users get the same page. The file in /var/man/cat/ has therefore been created by man.

Code:
root@darkstar:~# find /root /usr /var /opt -name 'sox.[0-9]*' -ls
817037   56 -rw-r--r--   1 root     root        49660 Feb  8  2011 /usr/man/man1/sox.1.gz
1580711   48 -r--r--r--   1 root     root        46662 Apr 21 22:12 /var/man/cat1/sox.1.bz2
root@darkstar:~#
echo $MANPATH outputs the same in both consoles, now.
 
Old 04-22-2012, 03:23 AM   #9
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
*/man/cat/* contains pre-formatted pages which are cached there by man when you ask for each page the first time. man will not cretae them if the 'cat' directories are not present. The file wil be of a different length because of the formatting process. I simply delete the cat dirs from the system to avoid 'phantom' files.
 
2 members found this post helpful.
  


Reply



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
[SOLVED] man and the paths where man looks for manuals. stf92 Linux - General 18 07-02-2010 06:52 AM
info <program> just gives me the man page Robhogg Ubuntu 1 10-17-2006 01:25 PM
Acidrip gnome dep. issues --or-- Man, the rabbit hole goes deep. goofyheadedpunk Slackware 14 09-27-2005 09:22 AM
I'm looking for a GNOME program to show man pages cccc Debian 1 07-17-2005 03:17 AM
Cygwin Xlib Issues for the Running Man BenRichards Linux - Software 0 09-07-2004 09:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:42 AM.

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