AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
  • 1.  getting locate to work on AIX...

    Posted Wed June 17, 2020 11:01 AM
    Hi, 

    I would like to get some information about the locate and updatedb commands in findutils.  Does this version of updatedb look at /etc/updatedb.conf?  What is the default location and filename for the database file generated by updatedb?  And/or what is the default that the locate command is looking for?

    Is this feasible - i.e. - will it work - if I set this up and give it a daily cron job on AIX.  When I look at the man pages on Red Hat and Ubuntu for these, things look a bit different so I wanted to ask a few questions to determine my probability of success on AIX.  In the end, are locate and updatedb just hanging around in the version of findutils but you guys have never giving them any serious thought?

    I just want to find out before I try to get this working.

    Thanks,
    Mike

    ------------------------------
    Michael Metts
    ------------------------------


  • 2.  RE: getting locate to work on AIX...

    Posted Wed June 17, 2020 01:08 PM
    GNU findutils provided "locate & updatedb" are different from the ones  provided by mlocate which is present in Redhat and Ubuntu. 
    It don't seem to support /etc/updatedb.conf. 
    https://www.gnu.org/software/findutils/manual/html_mono/find.html#Invoking-locate
    You can see from the above documentation that the default db is "/usr/local/var/locatedb" ( /usr/local" is the default prefix for any GNU packages).
    Since we build all Toolbox packages using the prefix "/opt/freeware" , the default db here is "/opt/freeware/var/locatedb".


    ------------------------------
    Ayappan P
    ------------------------------