Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I know if I run `updatedb` it would index all filesystem files. Sometimes, I install files into a directory and I want the new files to be in the database. I want a command such as `updatedb /opt/appdir` to update the new files information into the global database, not changing others. I consulted man but could not figure a way to update a single directory. Is it possible to do it?
I am using Fedora Core 3. I tried man updatedb, man locate/man slocate but none of them has the --localpaths info documented.
What's wrong with FC3?
And, I don't think `updatedb --localpaths=/opt/mozilla.org` works for me. It still takes several minutes to complete. /opt/mozilla.org has Firefox and Thunderbird installed. That does not need to take so long right?
Last edited by neo_in_matrix; 02-24-2005 at 09:00 AM.
I tried this on my homedirectory (33000 files) and it took appr. 30 s to complete.
Did you try it with ' around your path?
EDIT: here is the section from 'man updatedb':
Non-network directories to put in the database.
Default is /.
Network (NFS, AFS, RFS, etc.) directories to put in
the database. The environment variable NETPATHS
also sets this value. Default is none.
Directories to not put in the database, which would
otherwise be. The environment variable PRUNEPATHS
also sets this value. Default is /tmp /usr/tmp
File systems to not put in the database, which
would otherwise be. Note that files are pruned
when a file system is reached; Any file system
mounted under an undesired file system will be
ignored. The environment variable PRUNEFS also
sets this value. Default is nfs NFS proc.
Your system is fine ... his distro doesn't use slocate
but the ordinary, security-hole infested version :} which
has a different set of options ... only downside: you
can't update an individual directory
Heh... yup, and that's exactly what I said: The problem
is not with your installation but with his. He uses the OLD,
insecure locate/updatedb rather than the NEW, secure
slocate. And I didn't say you can't run it ...
Sorry to hear about the 'old and insecure' version of locate in SuSE.
And also sorry for the previously provided wrong information: updatedb --localpaths='' will do the same as updatedb -U path: it creates a database from this path and replaces the previously existing database. It will not update the existing database with the specified path.
I was curious to find out more about the difference between locate and slocate. It seems that slocate will show only files the actual user has access to, whereas locate shows all data. I guess this doesn't matter on a single user system. Is there more to know?