If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > find a directory

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-15-04, 12:51
saccskiz saccskiz is offline
Registered User
 
Join Date: Feb 2004
Posts: 143
find a directory

I wanted to find a directory named gatoss in the entire server starting from root. All directories and sub directories with that name should be listed with the paths. what is the command to do it. Thanks
Reply With Quote
  #2 (permalink)  
Old 03-15-04, 13:12
aigles aigles is offline
Registered User
 
Join Date: Jan 2004
Location: Bordeaux, France
Posts: 319
Code:
find / -type d -name gatoss
__________________
Jean-Pierre.
Reply With Quote
  #3 (permalink)  
Old 03-15-04, 13:26
saccskiz saccskiz is offline
Registered User
 
Join Date: Feb 2004
Posts: 143
Thanks for the command . I executed this command but it gives me a huge list which says-

find: cannot open /usr/local/opt/gatdir/vg32
find: cannot open /usr/local/opt/gatdir/fm46
find: cannot open /usr/local/opt/gatdir/vr16 ........



What might be the problem ?
Reply With Quote
  #4 (permalink)  
Old 03-15-04, 15:11
aigles aigles is offline
Registered User
 
Join Date: Jan 2004
Location: Bordeaux, France
Posts: 319
I think you don't have read access to directories.
To remove those error messages add '2> /dev/null'
__________________
Jean-Pierre.
Reply With Quote
  #5 (permalink)  
Old 03-16-04, 19:41
saccskiz saccskiz is offline
Registered User
 
Join Date: Feb 2004
Posts: 143
thanks, it worked
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On