I'm a bit new to unix/linux environment, but I have a small problem.
I'm using "locate" to find the path of a file I need, it gives me the path for it, but the file doesn't exist in that path, like that:
locate test1.txt
/home/user/test files/text1.txt
/home/user/test1.txt~
"test files" directory is where I was keeping the file and I copied it to the home directory once but I deleted it, no idea what it keeps telling me there is still a tmp file for it.
it worth mentioning that I used the command:
locate test1.txt~ |xargs -n1 rm
to remove that tmp file, but maybe that what caused the problem. I tried to show hidden files, and check for temp files, didn't find it either.
any clue what happened?
locateuses a database that is only updated periodically (e.g. every 24 hours) so it's quite possible for the database and reality to be out of sync. – Paul R Nov 29 '12 at 21:54findinstead oflocate(personal opinion alert -locateis the result of some misguided "we need to do things the same way Microsoft does" thinking). – twalberg Nov 29 '12 at 22:12locatedates from 1983. That is two years before the first windows version was released. – terdon Dec 2 '12 at 16:30