Go Back   The macosxhints Forums > OS X Help Requests > Applications



Reply
 
Thread Tools Rate Thread Display Modes
Old 07-09-2012, 03:15 PM   #1
svalenti
Triple-A Player
 
Join Date: Jun 2006
Posts: 51
Terminal App

Okay I'm trying to look up a man page on a mac pro running 10.7.4.

man 3 time

and get...

no entry for time in section 3 of the manual

I tried this on another mac running 10.6.8 and it works fine. Do I need to do something to get this working on 10.7??? Don't understand why it is not available on my new system.
svalenti is offline   Reply With Quote
Old 07-09-2012, 03:31 PM   #2
benwiggy
League Commissioner
 
Join Date: Aug 2006
Posts: 5,040
It works for me. What do you get as the results of "echo $MANPATH"
benwiggy is offline   Reply With Quote
Old 07-09-2012, 05:00 PM   #3
DeltaMac
League Commissioner
 
Join Date: Jan 2002
Posts: 7,958
Quote:
Originally Posted by benwiggy
It works for me. What do you get as the results of "echo $MANPATH"

I get no results, just a prompt.
What should be the result?
DeltaMac is offline   Reply With Quote
Old 07-09-2012, 05:43 PM   #4
trevor
Moderator
 
Join Date: Jun 2003
Location: Boulder, CO USA
Posts: 19,550
Quote:
Originally Posted by DeltaMac
I get no results, just a prompt.
What should be the result?

Really, it depends on how you set your MANPATH, but my computer running 10.6.8 shows:

Code:
% echo $MANPATH
/sw/share/man:/usr/share/man:/usr/bin/man:/usr/local/man:/usr/local/share/man:/usr/X11/man:/usr/man
Trevor
trevor is offline   Reply With Quote
Old 07-09-2012, 04:33 PM   #5
DeltaMac
League Commissioner
 
Join Date: Jan 2002
Posts: 7,958
Looks like there's no section 3 in the man for the time command in Lion.

Has it been replaced by the date command in Lion?

Looks like many manuals have been changed in Lion, eh?
DeltaMac is offline   Reply With Quote
Old 07-09-2012, 05:04 PM   #6
jsalmi
Triple-A Player
 
Join Date: May 2008
Location: Down by the river
Posts: 190
It works for me as well on 10.7.4.
jsalmi is offline   Reply With Quote
Old 07-10-2012, 01:50 AM   #7
SirDice
MVP
 
Join Date: Aug 2009
Posts: 1,119
Keep in mind section 3 of time talks about the libc function time(), not about the command time. The latter is in section 1.

Also keep in mind time is also a shell build-in.
SirDice is offline   Reply With Quote
Old 07-10-2012, 04:21 AM   #8
benwiggy
League Commissioner
 
Join Date: Aug 2006
Posts: 5,040
Now I think on it a bit, I seem to remember that MANPATH may be deprecated in OS X. Ah yes, here it:
http://hints.macworld.com/article.ph...31014053111192

It's dynamically constructed from PATH. From days of yore, I still have it set it in my .profile. I might comment it out.

So, what do you get as the results of "echo $PATH"?

I also seem to remember that there was an issue with Leopard upgrades from Tiger, where a lot of old Tiger man files were not deleted, leading to old man pages being used. But I digress.

Last edited by benwiggy; 07-10-2012 at 04:26 AM.
benwiggy is offline   Reply With Quote
Old 07-10-2012, 07:59 AM   #9
svalenti
Triple-A Player
 
Join Date: Jun 2006
Posts: 51
When I run this code I get...

Steven001737:~ svalenti$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin


running manpath returns nothing...
Steven001737:~ svalenti$ echo $MANPATH

Steven001737:~ svalenti$


If these pages are missing how do I install them???
svalenti is offline   Reply With Quote
Old 07-10-2012, 08:06 AM   #10
svalenti
Triple-A Player
 
Join Date: Jun 2006
Posts: 51
I should add that this is a new mac that came with 10.7 so I didn't upgrade from a different lower OS.
svalenti is offline   Reply With Quote
Old 07-10-2012, 09:33 AM   #11
benwiggy
League Commissioner
 
Join Date: Aug 2006
Posts: 5,040
It's much more likely that the man pages are installed, but not being found.

Reading further, it seems that if the $MANPATH variable is set, then those paths are used. If it isn't, then the paths are derived from the /etc/man.config file. However, it's not clear if that includes everything or everywhere by default. You may want to uncomment the following lines:
Code:
# Uncomment if you want to include one of these by default
#
# MANPATH	/opt/*/man
# MANPATH	/usr/lib/*/man
# MANPATH	/usr/share/*/man
# MANPATH	/usr/kerberos/man

Last edited by benwiggy; 07-10-2012 at 09:41 AM.
benwiggy is offline   Reply With Quote
Old 07-10-2012, 01:44 PM   #12
svalenti
Triple-A Player
 
Join Date: Jun 2006
Posts: 51
Comparing my two macs I see I only have 3 files in use/share/man/man3 folder on the machine that doesn't display the man pages running 10.7 where as there are lots of files on the other mac running 10.6 and contains many files beginning with Time....

Here are the only files in mac running 10.7...
Guard_Malloc.3.gz
guardmalloc.3.gz
libgmalloc.3.gz

If I do man 3 libgmalloc I get that page....

Where should the man pages for section 3 reside????
svalenti is offline   Reply With Quote
Old 07-10-2012, 02:30 PM   #13
benwiggy
League Commissioner
 
Join Date: Aug 2006
Posts: 5,040
Interestingly, "man 3 time" doesn't work on my 2009 MacBook.
It doesn't have a man 3 folder in /usr/share/man. (man 1, man 4 to man 9.)

Might the difference be an Xcode installation?
benwiggy is offline   Reply With Quote
Old 07-10-2012, 03:21 PM   #14
svalenti
Triple-A Player
 
Join Date: Jun 2006
Posts: 51
I have Xcode installed on both. The 10.7 mac was install thru the app store. I didn't have a choice where or how to install it... It just does whatever....
svalenti is offline   Reply With Quote
Old 07-11-2012, 03:10 AM   #15
ganbustein
MVP
 
Join Date: Apr 2008
Location: Berkeley CA USA
Posts: 1,009
I wonder if this is part of what Xcode considers "command line tools". Many files that are only useful to a programmer are not installed with OS X by default. The Xcode installer installs many of them (like the compilers themselves, and the header files in /System/Library/Frameworks). Then Xcode itself asks whether you want to "install the command line tools", which you would want it to do if you want to do any of your development outside the Xcode walled garden.

The man 3 pages would seem to fit that description. If you're writing a call to time(3) from within Xcode, Xcode can tell you all about it by consulting its private help files. You only need the files in /usr/share/man/man3 if you're programming outside Xcode.

I can't tell. I have Xcode installed on all my bootable volumes.

Look in Xcode→Preferences...→Downloads→Components and see if "Command Line Tools" is marked "Installed". Click (Install) if it isn't.
ganbustein is offline   Reply With Quote
Old 07-11-2012, 03:34 PM   #16
svalenti
Triple-A Player
 
Join Date: Jun 2006
Posts: 51
That was exactly it!!! Installed the command line tools and the /usr/share/man/man3/ folder was populated with files. I now have access to the documents in terminal app.

Thanks!!!
svalenti is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump



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


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.