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
awk command to find the count of files ina directory sish78 Shell Programming and Scripting 11 07-19-2007 09:00 AM
can't find named.conf to configuration DNS nghia77 UNIX for Dummies Questions & Answers 1 04-04-2006 01:22 PM
Help with find command on a shortcut directory(Alias)??? swamy455 UNIX for Dummies Questions & Answers 2 07-07-2005 02:32 PM
how to find a file in UNIX without find command? bluo Shell Programming and Scripting 3 09-25-2003 12:47 AM
using find command only in current directory jliebling UNIX for Dummies Questions & Answers 5 02-22-2001 10:00 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-25-2006
amirthraj_12 amirthraj_12 is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 10
how to find a file named vijay in a directory using find command

I need to find whether there is a file named vijay is there or not in folder named "opt" .I tried "ls *|grep vijay" but it showed permission problem.

so i need to use find command
  #2 (permalink)  
Old 10-25-2006
Glenn Arndt's Avatar
Glenn Arndt Glenn Arndt is offline Forum Advisor  
Anomalous Lurker
  
 

Join Date: Feb 2006
Location: Indianapolis, IN
Posts: 255
A simple "man find" would help you.
Code:
find /opt -name vijay
  #3 (permalink)  
Old 10-25-2006
amirthraj_12 amirthraj_12 is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 10
i tried this .. it just hangs up
  #4 (permalink)  
Old 10-25-2006
Glenn Arndt's Avatar
Glenn Arndt Glenn Arndt is offline Forum Advisor  
Anomalous Lurker
  
 

Join Date: Feb 2006
Location: Indianapolis, IN
Posts: 255
Do you have the appropriate read/execute permissions in that directory and/or on the file(s) that you seek?
  #5 (permalink)  
Old 10-25-2006
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,119
Actually "hangs up" usually means "did not respond as fast as I would like". It could be that /opt is very large and/or is a slow filesystem.
  #6 (permalink)  
Old 10-25-2006
ravikirankethe ravikirankethe is offline
Registered User
  
 

Join Date: Oct 2006
Location: NewYork
Posts: 21
Might be.. but in anycase, the result shd come fast.
Try searching the file in the opt folder first and see how much time
it is taking .
Command: ls -l vijay

If you are able to get the folder then come back to the parent folder
and give the follwing command
find opt/ -name vijay

If it taking the same amount of time, then as you said it might be
the overhead if not there is a problem of permission.
  #7 (permalink)  
Old 10-25-2008
ultimatix ultimatix is offline
Registered User
  
 

Join Date: Oct 2008
Location: Mumbai
Posts: 55
hey u can use this ...

find . -name vijay |sort

It will sort all directories containing the file Vijay in ascending order

Thanks
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 06:11 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
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