Locate Command?

T

taxxman2k

Guest
Hello all. I just got my first Powerbook G4 and OS X. I come from a mixed world of linux and winders. Very pleased thus far with this computer. But I do have a question.

Upon a first install of unix when you go to the terminal and try to run the "locate" command you get this:

locate:: no database file /var/db/locate.database

I get that on my new mac too. In unix it is easy to login as root and run "updatedb", then you are all done. However, when I run that on my Mac I get updatedb command noty found. What do I need to do? Is there a super user account? or am I thinking too linux and not enough Mac?

Thanks,
Dave
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
Do a man on the locate command. It should be able to find the command that will create the databse that you need.

if you are trying to find where certain commands are located. You can try whereis and whence. I know these work on other favors of unix.
 
OP
T

taxxman2k

Guest
Well I found this on another forum:

sudo /usr/libexec/locate.updatedb

then the locate command works. It creates the "library"

good suggestions, I am just so used to the locate command, I don't know why but I am.......

Great forums by the way!
 
OP
T

TylerMoney

Guest
there is definenlty a super user account you have to set up manually...but I've forgotten how...haven't done it..and until I learn more about unix..I won't...I can do everything I need with the administrator account....
 
Joined
Mar 9, 2004
Messages
2,860
Reaction score
21
Points
38
Location
Miami FL
Your Mac's Specs
G4 1Ghz OS X 10.4.7
updatedb is a Linux cron command - in Slackware - if that is the command you want you use (switching to root - superuser) sudo sh /etc/daily > this needs to be done /weekly (instead of daily) and monthly. again with all apps closed. to enable the root user: Open NetInfo Manager, located in Applications > Utilities.
Choose Security > Enable Root User and type a password for the root account. You may need to type an administrator password to make these changes.
Choose Apple menu > Log Out.
Choose Other in the Login window, type root in the Name field, and the root password in the Password field.
Remember root can do anything so you can fubar your system (I'm sure you this) and never be on line
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top