LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 12-18-2003, 05:28 AM   #1
juanb
Member
 
Registered: May 2002
Posts: 401

Rep: Reputation: 30
Question locate


Hi !!

I read the man pages for loacte command,but I didnt understand what this command does .

can someone explain please.

thanks
 
Old 12-18-2003, 05:34 AM   #2
MartinN
Member
 
Registered: Nov 2003
Location: Ronneby, Sweden
Posts: 555

Rep: Reputation: 30
With locate you can find a file in your file system. It works with a database that (on most distributions) is updated automatically once a day.

The alternative is the 'find' command, but that is much slower, since it searches through the entire file system.

Regards
Martin
 
Old 12-18-2003, 05:36 AM   #3
jkobrien
Member
 
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slackware, LFS, Ubuntu, RedHat, Slamd64
Posts: 507

Rep: Reputation: 30
Hi,

'locate -u' creates an index, or database, of all the files on your system. You don't generally have to do this though, as it's set up to run once a day on most systems. An exception might be if you've just installed a lot of software, then you might want to run it (as root).

'locate <filename>' uses that index to tell you where the file called <filename> is.

In fact, at least on my system, locate is a symbolic link to another program called 'slocate'. Which means that when you call locate, you're really calling slocate. This program does exactly the same thing except that if a user is not allowed to see a particular file or directory, it will bear this in mind when doing a search.

John
 
  


Reply


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
using locate command stabu Linux - Newbie 6 03-26-2004 04:13 AM
database and locate mikeshn Linux - General 1 01-19-2004 08:39 AM
Can't locate locate hindenbergbaby Linux - Newbie 3 10-22-2003 04:13 PM
how do i locate files? Pleasure Linux - Software 2 08-16-2003 08:42 AM
how to locate ? jamaso Linux - General 4 10-17-2002 03:45 PM


All times are GMT -5. The time now is 02:46 PM.

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