LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   question about whereis command (https://www.linuxquestions.org/questions/linux-newbie-8/question-about-whereis-command-805746/)

sidneyluo 05-03-2010 08:37 PM

question about whereis command
 
hi

i use whereis command to find some file. but it seems not work.
for example: i have a file named abc.v and it's in ~/main/ directory. i'm now in ~/ , and i input the command and get the result as below:


$whereis abc.v
abc:

what happened? nothing can i know from the message. am i right in using this command.

ps:
1/the abc.v is created on the linux server for months. so it should be updated to the database, if it has a such database.
2/i also use the command "locate". and the result is:

$locate abc.v
warning: locate: could not open database: /var/lib/slocate/slocate.db: No such file or directory
warning: You need to run the 'updatedb' command (as root) to create the database.
Please have a look at /etc/updatedb.conf to enable the daily cron job.

i'm not root user. so i can't use locate or whereis commands forever on this server?

thanks for the person can help me:)

Tinkster 05-03-2010 08:43 PM

Hi, welcome to LQ!

whereis is there to locate system packages, not user files.

If locate isn't working talk to the root user. Alternatively use find.



Cheers,
Tink

sidneyluo 05-03-2010 08:54 PM

thanks Tink! thank you for your quick response:)


All times are GMT -5. The time now is 08:37 PM.