Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Carl Fearby on August 06, 2002, 01:33:53 PM
-
there dont seem to be a locate command on SME does anyone know how to install this and if so where to get it from, also a howto would be excellent
Cheers
-
I was shocked to find that there was not a locate command in this version of e-smith, however I did find out that there is something like it, and it is quite good.
Its called find
to fiind a document
find / -name '*name*' -print
Its simple to use
find [in what directory, eg /, /var, /etc, it is basically the start directory and it will search all subdirectories] -name [what file, or files, eg '*squid*' will find squid.conf and other items dealling with squid] -print
Hope this may help
-
slocate ships on the CD, but isn't installed by default. I don't agree with this decision, but it isn't intended that you'll be using the command line on the server at all, so I suppose it isn't really a problem.
find works and is more up-to-date, but it's slower and more of a pain syntax-wise. Locate is much simpler in syntax and faster (since it queries a database rather than searching the whole filesystem), but it isn't quite as up-to-date (since the database is updated daily).
-
There IS a locate command! But you have to run the updatedb command at first.
Simply type in "updatedb" (Without quotes) into the server console. Then try with something like "locate apache"
Regards
Z3rO
-
[root@server /root]# updatedb
bash: updatedb: command not found
[root@server /root]# locate
bash: locate: command not found
[root@server /root]#
that dont work Z3rO wrote:
>
> There IS a locate command! But you have to run the updatedb
> command at first.
> Simply type in "updatedb" (Without quotes) into the server
> console. Then try with something like "locate apache"
>
> Regards
>
> Z3rO
-
Dan Brown wrote:
>
> slocate ships on the CD, but isn't installed by default.
It is installed by default in version 5.5. The reason that it wasn't by default in earlier versions was due to the number of users reporting concern at the middle-of-the-night disk activity while the index was updated. But convenience has won out, and it's back as a standard feature. If anyone doesn't want the extra activity, they can "rpm -e slocate".
Regards
Charlie
-
OK, thanks for the update, Charlie. It was on my test 5.5 box, but I've tinkered around with that one enough that I didn't remember if it was there by default.