The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
script to locate servers ibroxy Shell Programming and Scripting 5 05-30-2008 03:54 AM
Equivalent to locate Russell SUN Solaris 5 10-05-2006 05:10 PM
not able to locate SSH bishweshwar UNIX for Dummies Questions & Answers 5 09-11-2006 01:14 PM
Cant locate CGI/Cookie.pm naik_mit Linux 1 05-27-2005 12:51 AM
Difference between locate and find camerja1 UNIX for Dummies Questions & Answers 1 06-25-2002 01:55 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-26-2008
praveen_b744 praveen_b744 is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 49
Question 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 short name for slocate.But in my box (RHEL5) slocate command is not working.

Please clear my doubts.
Thanks in advance.
  #2 (permalink)  
Old 08-26-2008
sydney2008 sydney2008 is offline
Registered User
  
 

Join Date: Aug 2008
Location: Sydney, Australia
Posts: 26
try this

find / -name filename it may take sometime to update the local db.
  #3 (permalink)  
Old 08-26-2008
praveen_b744 praveen_b744 is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 49
Thanks Sydny,
I am aware of searching the file. My doubt is wether the command 'locate' consider /tmp or not?
  #4 (permalink)  
Old 08-26-2008
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2005
Location: Switzerland - GE
Posts: 1,546
I would say "not" but thats a question of configuration, go through the docs because in my younger life I used it customly to figure out if files ever existed (at such date, in such dir etc...)
  #5 (permalink)  
Old 08-26-2008
praveen_b744 praveen_b744 is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 49
Thanks Vbe,

What you said is correct.
  #6 (permalink)  
Old 08-26-2008
agasamapetilon agasamapetilon is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 67
You can also specify the directory in which you want to look for, cause if you specify only / it look up in the whole system.
Code:
find /tmp -name filename

Last edited by agasamapetilon; 08-26-2008 at 04:02 PM..
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 09:16 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0