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 > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to find a specific files in a many directory selamba_warrior Shell Programming and Scripting 7 05-28-2008 03:41 PM
How to list files with specific created date Draculla Filesystems, Disks and Memory 2 05-03-2007 11:45 PM
List files created between specific date and time jazjit Shell Programming and Scripting 3 04-27-2007 01:19 AM
List files with a specific date... B14speedfreak SUN Solaris 4 06-15-2006 08:59 AM
List specific files from directories Filippo Shell Programming and Scripting 4 02-17-2005 03:56 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-13-2007
Sat510 Sat510 is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 4
List all files that contain a specific directory

I need to list all files and subdirectories that contain "oradata".

For example, I have several files in several different directories that contain "oradata". I.e.

/u07/oradata/1.dbf
/u09/unix/whatever/oradata/2.xxx

That is, whatever file on the system that contains a directory called "oradata"
should be piped to a file output.

I tried a few things;

find -name "*oradata*"

Any ideas??
  #2 (permalink)  
Old 04-13-2007
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,206
find / | grep oradata
  #3 (permalink)  
Old 04-17-2007
Sat510 Sat510 is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 4
I also have one more question.

In my .profile i have the following environment variable set:

ORACLE_SID=scwa102
export ORACLE_SID

When I source my profile, (i.e. ./.profile) and issue
echo $ORACLE_SID, I get:

"ORACLE_SID undefined variable."

If however, I issue the command at the Unix prompt:

$ ORACLE_SID=scwa102
$ export ORACLE_SID
$ echo $ORACLE_SID
scwa102

It works. What gives? Why are these commands not becoming active in the .profile or when I log out and log in?
  #4 (permalink)  
Old 04-17-2007
Sowser Sowser is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 90
not sure

i dunno man....when i run it, it works every time.

$ . ./.profile

There is one incident that this will fail, which i have replicated, its when your .profile doesnt exist.

$ . ./.profile
ksh: ./.profile: not found

but your error is completely different.

If i think of anything, i will let ya know.

-S
  #5 (permalink)  
Old 04-13-2007
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
Your command will look for files that have 'oradata' as part of the filename and not the entire path. You could run find like this:
Code:
find / -type f | grep "oradata"
It may take time, though.
  #6 (permalink)  
Old 04-16-2007
Sat510 Sat510 is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 4
Thank you.

I also have one more question.

In my .profile i have the following environment variable set:

ORACLE_SID=scwa102
export ORACLE_SID

When I source my profile, (i.e. ./.profile) and issue
echo $ORACLE_SID, I get:

"ORACLE_SID undefined variable."

If however, I issue the command at the Unix prompt:

$ ORACLE_SID=scwa102
$ export ORACLE_SID
$ echo $ORACLE_SID
scwa102

It works. What gives? Why are these commands not becoming active in the .profile or when I log out and log in?
  #7 (permalink)  
Old 04-16-2007
Sowser Sowser is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 90
try this....

i dont think your sourcing it correctly.

try this:

". ./.profile"

dot space dot slash dot profile

-S
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 02:01 PM.


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