Locate command not working


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Locate command not working
# 1  
Old 07-24-2013
Locate command not working

HI when ever i type the locate command it is saying like below

Code:
 
warning: locate: warning: database /var/lib/slocate/slocate.db' is more than 8 days old


i am using Linux .
version is as follows...

$ uname -a

Linux abc.abc.com 2.6.9-89.35.1.ELhugemem #1 SMP Tue Jan 4 22:43:29 EST 2011 i686 athlon i386 GNU/Linux



why i ma getting this error? is ther anyway i can do some install/work around so that locate command works.
# 2  
Old 07-24-2013
Run updatedb...


Code:
$ updatedb

This User Gave Thanks to rajamadhavan For This Post:
# 3  
Old 07-24-2013
Quote:
Originally Posted by rajamadhavan
Run updatedb...


Code:
$ updatedb


Hi I tried this commnad and it gave me an error syaing below .what can be done ?do i need to involve administers to run this command.


Code:
 
$ updatedb
fatal error: updatedb: You are not authorized to create a default slocate database!

# 4  
Old 07-24-2013
Yes. Only root can do that.
This User Gave Thanks to rajamadhavan For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute ssh command with additional terminal command to any remote user not working script

Hello i am having an issue with bash script and this is the code now=$(cat hosts1.txt | awk '{print $2;}') while read n ;do ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers' When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies

2. UNIX for Dummies Questions & Answers

Shell script not working but command works in command prompt

Hi everyone I have a problem with my script If I try directly this command /usr/bin/nice -n 19 mysqldump -u root --password="******" wiki_schneider -c | nice -n 19 gzip -9 > /point_de_montage/$(date '+%Y%m%d')-wiki-db.sql.gz It works But if I simply add this command in a script and... (8 Replies)
Discussion started by: picemma
8 Replies

3. Shell Programming and Scripting

Maxdepth command not working in AIX.Need alternative solution for this command

Hi All, I am trying to select 30 days older files under current directory ,but not from subdirectory using below command. find <Dir> -type f -mtime + 30 This command selecting all the files from current directory and also from sub directory . I read some documention through internet ,... (1 Reply)
Discussion started by: kommineni
1 Replies

4. AIX

Locate command

Hello to all, Can I use the "locate" command on AIX 5.3 like on Linux. If yes what packages should I install and where can I find them. Thanks, Enid (9 Replies)
Discussion started by: enux
9 Replies

5. Homework & Coursework Questions

locate command alternative,,

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! Ok, Im back with another small problem. I created a script (the one posted in the last thread). After some help from some members here all is good. The problem is I made it... (4 Replies)
Discussion started by: ozman911
4 Replies

6. Shell Programming and Scripting

Need help! command working ok when executed in command line, but fails when run inside a script!

Hi everyone, when executing this command in unix: echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error. here is content of my script: tdbsrvr$ vi hc.sh "hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies

7. UNIX for Dummies Questions & Answers

Locate command in encrypted home

Hi! I have some files that I want to locate using the locate command in terminal, but my home folder is encrypted using FileVault from Mac OS X 10.6. Any idea how can I locate them, being my home encrypted? (8 Replies)
Discussion started by: tirwit
8 Replies

8. HP-UX

Locate command in HP-UX and Solaris

Previously i worked on linux now i am working on HP-UX and solaris ... I am not able to use Locate command(command not found) in HP-Ux and solaris. Suggest me some options to use locate (6 Replies)
Discussion started by: girija
6 Replies

9. Shell Programming and Scripting

locate command doubt !!!

Hello, I want to search for a file/directory named "abc" which is located anywhere in the given unix system. I am using the command :- But the problem is that this is giving me all combinations of files with have 'abc' in their name. But can I know the option to be used to get the location... (5 Replies)
Discussion started by: nsharath
5 Replies

10. UNIX for Dummies Questions & Answers

command locate.

Hi, I am aware of the command locate/slocate. But when I try to search the file which is located in /tmp. Its not able to get it. I tried by updating the database also with the command updatedb. Is there any consern that the command 'locate' dont check /tmp??? And I knew that locate is the... (5 Replies)
Discussion started by: praveen_b744
5 Replies
Login or Register to Ask a Question