Go Job Hunting at the LQ Job Marketplace
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-12-2007, 12:52 PM   #1
LQ Newbie
Registered: Feb 2007
Posts: 11

Rep: Reputation: 0
Difference between slocate and locate cmd's

Out of curiousity, can someone explain the difference between using the 'slocate' and the 'locate' commands?
Old 10-12-2007, 01:41 PM   #2
Registered: Apr 2004
Location: Scotland
Distribution: Suse, OpenWRT
Posts: 299

Rep: Reputation: 30
AFAIK the main difference is that slocate doesn't index the directories and files you don't have access to so doesn't throw up auth errors like locate
Old 10-13-2007, 03:52 AM   #3
LQ 5k Club
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,063

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
On my system, they are the same:
tgar@vaio:~$ ls -l /usr/bin/locate
lrwxrwxrwx 1 root root 7 2007-02-24 07:30 /usr/bin/locate -> slocate
Old 10-13-2007, 07:01 AM   #4
Registered: Apr 2004
Location: Scotland
Distribution: Suse, OpenWRT
Posts: 299

Rep: Reputation: 30
That's true - locate links to slocate. It is a replacement for locate used by almost all new distros


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create automatically the /var/lib/slocate/slocate.db irhernan Linux - Newbie 3 09-12-2006 03:29 PM
cpan> locate -u Unknown shell command 'locate -u'. Type ? for help. sharad2005 Linux From Scratch 1 08-04-2006 01:40 AM
Wat is main difference between find and locate command. rktech83 Linux - General 1 03-08-2006 08:38 AM
help with slocate plan9 Slackware 8 07-10-2004 02:41 AM
Using slocate in RH 7.2 hominy Linux - Newbie 1 08-10-2003 03:59 PM

All times are GMT -5. The time now is 09:54 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration