'locate' not showing some files
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
'locate' not showing some files
I updated the database (using 'updatedb' as root) but I still can't find my files with 'locate' command. I know they're there. It might be because I have an encrypted home directory. (Man, I wish I never did that.) Does anyone know what I can do? I don't remember having this problem before. But now I am transferring all my important files so I can make a clean upgrade of Linux Mint. Now I need that locate command more than ever. Does anyone know what might be wrong, or a workaround?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: 'locate' not showing some files
Yes, correct. Updatedb is configured not to index files on encrypted file systems. That is configured in /etc/updatedb.conf. I wouldn't mess with that though.
Instead of locate, you can use find to search for files in your home folder. Just open a terminal and do:
Where you replace filename with the name of the file you want to find. You can use wildcards also, so "find ~ -iname *.jpg" finds all your jpg images.
Instead of locate, you can use find to search for files in your home folder. Just open a terminal and do:
Code: Select all
find ~ -iname filename
Re: Re: 'locate' not showing some files
Yeah, I guess I can use find. It will be a very slow process though. Thanks.xenopeek wrote:Yes, correct. Updatedb is configured not to index files on encrypted file systems. That is configured in /etc/updatedb.conf. I wouldn't mess with that though.
Instead of locate, you can use find to search for files in your home folder. Just open a terminal and do:Where you replace filename with the name of the file you want to find. You can use wildcards also, so "find ~ -iname *.jpg" finds all your jpg images.Code: Select all
find ~ -iname filename
Re: 'locate' not showing some files
Ehem. find ~ -iname *.jpg will not work if you have any files matching *.jpg in the current directory.
Always escape special characters to be used, or enclose in single quotes:
Always escape special characters to be used, or enclose in single quotes:
Code: Select all
find ~ -iname '*.jpg'