Solved: Locate command not working in Linux SSH, "No such file or directory"
If you run into this error when using the locate command:
Code:
root@server6:~# locate index.html Code:
root@server6:~# updatedb What is updatedb? Updatedb updates file name databases used by GNU locate. What is locate? Locate searches through a prebuilt database of files, and is significantly faster than find. However, it requires the database to be updated regularly. My specific problem did not start until I stopped using root SSH logins, opting to instead "su -" to the root user after logging in from an alternate account. (This is done for safety, of course. Disallowing root SSH access prevents brute force hacking attempts on common defaults usernames -- i.e., "root".) This happened on an Ubuntu 10.10 server running ISPConfig 3. Easy fix, simple issue. :thumb: Need a good VPS host? See our non-spammy List of top quality VPS web hosting providers. Servers always have problems. Having a good hosts helps prevent/avoid them! |
Here's another example, from a CentOS 5 x86_64 server running Plesk 9 in a Virtuozzo VPS container.
I was trying to locate any file/folder with the name "bind", by typing in locate bind Code:
[root@server ~]# locate bind In this scenario, a required package is not installed. Type rpm -q mlocate vixie-cron anacron to see what's installed vs what's missing. Code:
[root@server mlocate]# rpm -q mlocate vixie-cron anacron Note that by default Plesk disables yum, so the host will have to enable it manually. Anacron RPM can be located here: http://rpm.pbone.net/index.php3/stat...86_64.rpm.html Among other places. |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.