LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 04-27-2012, 08:28 AM   #16
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,088

Original Poster
Rep: Reputation: 45

But is there not a way to exclude a certain path when running locate without having to update the database again? Of course there is always locate beethoven | grep -v /home/semoi/bee9

Last edited by stf92; 04-27-2012 at 08:34 AM.
 
Old 04-27-2012, 09:02 AM   #17
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946
Ah-ha. I just realized my mistake. I was talking about the locate from findutils, not slocate. Ignore my last post.
 
Old 04-27-2012, 12:46 PM   #18
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,088

Original Poster
Rep: Reputation: 45
Thanks for your post anyways and regards.
 
Old 04-29-2012, 03:23 AM   #19
chrisretusn
Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware
Posts: 471

Rep: Reputation: Disabled
Quote:
Originally Posted by stf92 View Post
But is there not a way to exclude a certain path when running locate without having to update the database again? Of course there is always locate beethoven | grep -v /home/semoi/bee9
Sadly these is not, your grep solution is a winner. I also sometimes just go with find.
 
Old 06-28-2012, 05:30 AM   #20
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,088

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by chrisretusn View Post
No If you delete a file, it remains in slocate.db until the next update. That said, if you subsequently searched for that deleted file, locate (slocate) checks for physical existence, because that file no longer exist, it's entry in slocate.db will be removed. In this case the database is updated.

Fine. Now watch this:
Code:
semoi@darkstar:/hdaal/sma_/info$ locate beethoven
/home/semoi/bee9/beethoven9.md5
semoi@darkstar:/hdaal/sma_/info$ rm /home/semoi/bee9/beethoven9.md5
semoi@darkstar:/hdaal/sma_/info$ locate beethoven
/home/semoi/bee9/beethoven9.md5
semoi@darkstar:/hdaal/sma_/info$
Are you not speaking about some slocate version > 3.1?
 
  


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
Remove time stamps from text file Ashex Linux - General 1 08-23-2011 09:16 PM
how to configure updatedb to update locate database manually septanla Linux - General 4 12-22-2010 02:05 PM
(my)sql: drop database doesn't remove database kpachopoulos Programming 3 09-19-2007 01:32 PM
Where is locate's database? armandino Linux - Software 1 03-14-2007 11:21 AM
database and locate mikeshn Linux - General 1 01-19-2004 08:39 AM


All times are GMT -5. The time now is 12:16 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration