PDA

View Full Version : Locate command?



fvs
3rd May 2006, 08:05 PM
I just came over form Mac OS X and in my terminal I ran the cron manualy with this command, periodic daily weekly monthly, Because I don't leave my box on all the time, My question is what command in linux terminal will do the same? I can't seem to get the locate command to work in linux terminal, I was told that it updates through the periodic command.in Mac, dose it also need to update in linux? I used updatedb command and no dice.

Dunhausen
3rd May 2006, 08:21 PM
updatedb /is/ what you want to use. run it as root, though. (type "su" first).

You might find beagle more to your liking. The newer kernels have inotify which allows the database to be updated in realtime, meaning it always has everything on your drive accurately indexed. (you also need to make sure /etc/fstab has a setting like "defaults,user_xattr" for your data drive). It also indexes the content of files, including pdfs, chatlogs, web caches, mp3 metadata, etc., which is really handy.

More info (http://beaglewiki.org/Main_Page).

fvs
3rd May 2006, 10:02 PM
updatedb /is/ what you want to use. run it as root, though. (type "su" first).

You might find beagle more to your liking. The newer kernels have inotify which allows the database to be updated in realtime, meaning it always has everything on your drive accurately indexed. (you also need to make sure /etc/fstab has a setting like "defaults,user_xattr" for your data drive). It also indexes the content of files, including pdfs, chatlogs, web caches, mp3 metadata, etc., which is really handy.

More info (http://beaglewiki.org/Main_Page).
OK it seems that Beagle is already installed but I don't know where it is? it's not on my desktop and when i use the command "which beagle" it 'don't show? How to launch it?
PS Here is my file with none of those defaults, What order do I put them?

/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0

markkuk
3rd May 2006, 10:14 PM
I just came over form Mac OS X and in my terminal I ran the cron manualy with this command, periodic daily weekly monthly, Because I don't leave my box on all the time,
In Fedora the "anacron" service takes care of running the daily/weekly/monthly cron scripts even when the computer isn't on 24/7. Just make sure anacron is installed and enabled.

Dunhausen
3rd May 2006, 10:32 PM
OK it seems that Beagle is already installed but I don't know where it is? it's not on my desktop and when i use the command "which beagle" it 'don't show?
It's actually called "beagle-search." For reference, typing "ls /usr/bin/beagle*" will give you a list of the beagle programs.

Personally, I have added a launcher for it to the gnome panel (right click --> add to panel --> custom launcher). But I think it is supposed to be the default search invocation in FC5 if you go to Places --> Search.


How to launch it?
Either with the commandline option or creating a launcher (the "Command Line" addon for the gnome-panel is really handy). Also, FC5 shipped with the beagle daemon turned off because at that time the FC5 version had a memory leak. To make sure the daemon always runs, go to System --> Preferences --> Sessions and add "/usr/bin/beagled" to Startup Programs. You can put anything here that you would like to launch when you login.


PS Here is my file with none of those defaults, What order do I put them?
This should be what you want:

/dev/VolGroup00/LogVol00 / ext3 defaults,user_xattr 1 1
LABEL=/boot /boot ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
Otherwise, beagle will have to use sqlite for the indexing, which is slow and resource intensive.

fvs
4th May 2006, 04:06 PM
Thanks, Tried it and still can't launch beagle,
/usr/bin/beagle-config /usr/bin/beagle-info
/usr/bin/beagled /usr/bin/beagle-ping
/usr/bin/beagle-exercise-file-system /usr/bin/beagle-query
/usr/bin/beagle-extract-content /usr/bin/beagle-search
/usr/bin/beagle-imlogviewer /usr/bin/beagle-settings
/usr/bin/beagle-index-info /usr/bin/beagle-shutdown
/usr/bin/beagle-index-url /usr/bin/beagle-status
But I can't launch it and can't find it on desktop, Could not connect to daemon.

blue13130
4th May 2006, 06:33 PM
I would use the anacron method that has already been mentioned. I don't leave my laptop on all the time but anacron will run the cron jobs when the machine is on. Once you have anacron working, there is a daily cron file called /etc/cron.daily/slocate.cron that will cause an update to locate. You will need to edit /etc/updatedb.conf and make sure the DAILY_UPDATE option is set to yes. You can edit settings for anacron by editting the file /etc/anacrontab