You are not logged in.

#1 2005-04-12 02:33:14

kcy29581
Member
From: CA
Registered: 2004-12-23
Posts: 231

deleted files still appear [SOLVED]

Hi all,

I just compared my pacnew files to their equivalents and deleted the pacnew ones. If I go to Gnome and use the "find files" utility it cant find any pacnew files, as expected as I deleted them!

But if I use

locate *.pacnew

all the pacnew files still appear! Why is this?

Thanks


There is no spoon in Arch...

Offline

#2 2005-04-12 03:41:52

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: deleted files still appear [SOLVED]

locate uses a database.  Probably it hasn't been updated since you deleted the files. That should be taken care by crond.

Offline

#3 2005-04-12 03:47:42

kcy29581
Member
From: CA
Registered: 2004-12-23
Posts: 231

Re: deleted files still appear [SOLVED]

so how do I sort this out then?


There is no spoon in Arch...

Offline

#4 2005-04-12 04:09:34

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: deleted files still appear [SOLVED]

You should be OK if you have crond in the DAEMONS array of rc.conf

You can also run :
# updatedb
  to update the database.

Offline

#5 2005-04-12 04:17:33

kcy29581
Member
From: CA
Registered: 2004-12-23
Posts: 231

Re: deleted files still appear [SOLVED]

ok, thanks!


There is no spoon in Arch...

Offline

#6 2005-04-12 04:46:54

kcy29581
Member
From: CA
Registered: 2004-12-23
Posts: 231

Re: deleted files still appear [SOLVED]

I already had crond in the daemons list... so why doesn't it update the database automatically?


There is no spoon in Arch...

Offline

#7 2005-04-12 04:55:50

woodstock
Member
From: Toronto / Canada
Registered: 2004-11-21
Posts: 68

Re: deleted files still appear [SOLVED]

try this in a terminal:

updatedb -u

might help.


-- woodstock

Offline

#8 2005-04-12 05:04:24

kcy29581
Member
From: CA
Registered: 2004-12-23
Posts: 231

Re: deleted files still appear [SOLVED]

doing that right now. hope it works! smile


There is no spoon in Arch...

Offline

#9 2005-04-12 08:49:35

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: deleted files still appear [SOLVED]

crond updates it at midnight. so your computer obviously hasnt been on at midnight for a while.

Offline

#10 2005-04-12 09:13:31

neri
Forum Fellow
From: Victoria, Canada
Registered: 2003-05-04
Posts: 553

Re: deleted files still appear [SOLVED]

iphitus wrote:

crond updates it at midnight. so your computer obviously hasnt been on at midnight for a while.

Yupp, tpowa posted a nice feature request in the bugtracker to work around
that "midnight not running" issue smile

-neri

Offline

#11 2005-04-12 15:07:28

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: deleted files still appear [SOLVED]

You can also use anacron from my repo.  It updates at boot ups (well, 20 min. after).  I will add this comment to the bugtracker.

Offline

#12 2005-04-12 17:15:30

MEfreak
Member
Registered: 2004-07-18
Posts: 20

Re: deleted files still appear [SOLVED]

At the risk of sounding like an idiot...

is "updatedb -u" equivalent to "locate -u" ?  I've used the latter (locate -u) for quite some time.

Offline

#13 2005-04-12 17:22:00

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: deleted files still appear [SOLVED]

MEfreak wrote:

At the risk of sounding like an idiot...

is "updatedb -u" equivalent to "locate -u" ?  I've used the latter (locate -u) for quite some time.

updatedb is a link to slocate.  (locate is a link too wink )  By default, updatedb == updatedb -u

Offline

#14 2005-04-12 17:32:22

woodstock
Member
From: Toronto / Canada
Registered: 2004-11-21
Posts: 68

Re: deleted files still appear [SOLVED]

Snowman is correct. I just remember that in my Slackware days I had to use a combination of updatedb and slocate to find .new files and edit them by hand. Much like Arch has the .pacnew or .pacsave files.

MEfreak, don't worry about asking those types of questions, we wont bite your face off. At least I wont. wink


-- woodstock

Offline

#15 2005-04-12 18:44:37

kcy29581
Member
From: CA
Registered: 2004-12-23
Posts: 231

Re: deleted files still appear [SOLVED]

Thanks for all the help guys, I think I get it now! It would be nice if slocate automatically updated the database once you deleted a file.

How does Windows accomplish this? If you delete a file it immediately no longer registers in a search. Also Gnome's search is a lot better at this as well. Does Gnome use fam to do this?


There is no spoon in Arch...

Offline

#16 2005-04-12 20:21:21

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: deleted files still appear [SOLVED]

kcy29581 wrote:

Thanks for all the help guys, I think I get it now! It would be nice if slocate automatically updated the database once you deleted a file.

How does Windows accomplish this? If you delete a file it immediately no longer registers in a search. Also Gnome's search is a lot better at this as well. Does Gnome use fam to do this?

locate is meant to cache for speed reasons.

If you don't want/like that; use `find` and all is well smile

Offline

#17 2005-04-12 20:41:49

kcy29581
Member
From: CA
Registered: 2004-12-23
Posts: 231

Re: deleted files still appear [SOLVED]

right, of course. thats another cool idea wink


There is no spoon in Arch...

Offline

#18 2005-04-12 20:43:57

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: deleted files still appear [SOLVED]

I use find myself... never touch locate, as I don't like keeping the db up to date

Offline

#19 2005-04-12 20:46:15

kcy29581
Member
From: CA
Registered: 2004-12-23
Posts: 231

Re: deleted files still appear [SOLVED]

I think I might start doing that as well now, phrakture. Too much hassle to worry about right now!


There is no spoon in Arch...

Offline

#20 2005-04-12 20:54:42

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: deleted files still appear [SOLVED]

find . -name '*.pacnew*'

To find all files in the local dir.


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#21 2005-04-12 22:08:15

jerem
Member
From: France
Registered: 2005-01-15
Posts: 310

Re: deleted files still appear [SOLVED]

If you use find instead of locate, you dont need to update anything.

find / -name '*.pacnew'

And if you dont want to keep the updates files :

find -name '*.pacnew' -exec rm {} ;


Usually, you only need to look into /etc :

find /etc -name '*.pacnew'

Offline

Board footer

Powered by FluxBB