New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
Switcher Hangout The place for switchers to discuss their new machines, and how to work with OS X. General support can be had here for newbie stuff, like "How do I restart my new iMac?" :)

Locate Command?


Post Reply New Thread Subscribe

 
Thread Tools
taxxman2k
Guest
 
Posts: n/a

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
QUOTE Thanks
rman

 
rman's Avatar
 
Member Since: Dec 24, 2002
Location: Los Angeles, California
Posts: 12,589
rman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud of
Mac Specs: 2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi

rman is offline
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.

Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!
QUOTE Thanks
taxxman2k
Guest
 
Posts: n/a

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!
QUOTE Thanks
TylerMoney
Guest
 
Posts: n/a

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....
QUOTE Thanks
witeshark

 
witeshark's Avatar
 
Member Since: Mar 09, 2004
Location: Miami FL
Posts: 2,860
witeshark will become famous soon enough
Mac Specs: G4 1Ghz OS X 10.4.7

witeshark is offline
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
QUOTE Thanks

Post Reply New Thread Subscribe


« I hate it!!! Stupid iChat.. grrrrr | My data keeps disappearing. »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
looking for a terminal emulator and command shell in Mac OSX CandiMarie OS X - Operating System 9 03-05-2004 04:53 PM
Unix command master class. Amen-Moses Community Suggestions and Feedback 2 02-10-2004 08:34 PM
Hi I cannot eject my dvd after I unmounted it from the command line shorki OS X - Operating System 4 07-14-2003 10:29 PM
Duplicate a CD/DVD-ROM via the command line gatorparrots OS X - Development and Darwin 0 12-24-2002 01:32 AM

All times are GMT -4. The time now is 09:04 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?