Results 1 to 5 of 5

Thread: Locate Command?

  1. #1
    Locate Command?
    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?


  2. #2

    rman's Avatar
    Member Since
    Dec 24, 2002
    Los Angeles, California
    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
    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!

  3. #3
    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!

  4. #4
    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....

  5. #5

    witeshark's Avatar
    Member Since
    Mar 09, 2004
    Miami FL
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Cannot locate malware
    By P1ps in forum Security Awareness
    Replies: 13
    Last Post: 06-16-2015, 01:35 PM
  2. Recent convert, command+c, command+v strange to reach on keyboard
    By milliamp in forum OS X - Operating System
    Replies: 3
    Last Post: 05-16-2015, 03:20 PM
  3. Way to disable control+command+eject command
    By brasil2908 in forum OS X - Operating System
    Replies: 1
    Last Post: 09-19-2014, 03:06 PM
  4. need to help iTunes to locate it's songs
    By jackt in forum OS X - Apps and Games
    Replies: 0
    Last Post: 12-04-2011, 04:35 PM
  5. Spotlight vs. updatedb/locate
    By Jick in forum OS X - Operating System
    Replies: 10
    Last Post: 06-17-2011, 07:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts