14 C
Texas
Melhttp://www.osradar.com
Guru Unix /Linux and GNU supporter

Install mlocate in FreeBSD

if you came from Linux word then is mlocate is very familiar for you , is one of the best ways to find files and Folders, in Linux the the package called mlocate and is you can install via Linux package management

In FreeBSD, the Package management cannot find mlocate command

root@osradar:~ # pkg  install  mlocate
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
pkg: No packages available to install matching 'mlocate' have been found in the repositories
root@osradar:~ #
- Advertisement -

not be disappointed

the mlocate command in installed by default in FreeBSD, but u have to rebuild the database first, maybe you are thinking updatedb should work . NOO!!

root@osradar:~ # updatedb
updatedb: Command not found.
root@osradar:~ #

mm! What is the command to rebuid mlocate the database in FreeBSD

I found that PC-BSD’s base configuration /etc/defaults/periodic.conf check if the weekly mlocate activated

weekly_locate_enable="YES"

Rebuid the database manually

[root@osradar /osradarweb]# /etc/periodic/weekly/310.locate

Rebuilding locate database:

it will take some minutes to make the DB ready, after that the mlocate command should work correctly.

[root@osradar ~]# locate  nagios4
/usr/ports/net-mgmt/cnagios4
/usr/ports/net-mgmt/cnagios4/Makefile
/usr/ports/net-mgmt/cnagios4/distinfo
/usr/ports/net-mgmt/cnagios4/files
/usr/ports/net-mgmt/cnagios4/files/patch-Makefile.in
/usr/ports/net-mgmt/cnagios4/pkg-descr
/usr/ports/net-mgmt/cnagios4/pkg-plist
/usr/ports/net-mgmt/nagios4
/usr/ports/net-mgmt/nagios4/Makefile
/usr/ports/net-mgmt/nagios4/distinfo
/usr/ports/net-mgmt/nagios4/files
/usr/ports/net-mgmt/nagios4/files/nagios.in
/usr/ports/net-mgmt/nagios4/files/patch-configure

Please Enjoy !!

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

1 COMMENT

  1. ur article get many twists and turns, and the inpatient me repeat every mistake u made and finally found that the true answer is at bottom of the article. xD

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article