Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: shell script needed

RE: shell script needed

From: Lange, Kevin <KLange_at_ppoone.com>
Date: Wed, 31 Oct 2007 13:15:37 -0400
Message-ID: <1C29436B0A5DC948908F9F2A22B3B36EB6C54A@PHLXCHVS2.Mail.Fiserv.net>


Since you are already using the find command, how about using the -EXEC flag on it to show the details of the file , such as :  

find /u0*/oradata/SID -name "*.dbf" -exec ls -al {} \;    


From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Andrew Kerber
Sent: Wednesday, October 31, 2007 11:01 AM To: Vincent verpoort; oracle-l
Subject: Re: shell script needed

I have been doing some research, it looks like I can do most of what I need with the find command. Is there any way to get the file permission in octal to print out with the find command?

On 10/31/07, Andrew Kerber <andrew.kerber_at_gmail.com> wrote:

        Same os, same oracle version. so, yes they are the same but the are on different servers.                                             

        On 10/31/07, Vincent verpoort < vincent.verpoort_at_gmail.com <mailto:vincent.verpoort_at_gmail.com> > wrote:

                So what you want is to do a read the sopy those permissions to a other Oracle_home ?                 

                if so are the oracle_homes the same ?                                                   

                On 10/31/07, Andrew Kerber <andrew.kerber_at_gmail.com> wrote:

                        I know that I can do it recursively. However, the privileges needed vary by file and directory. Some files need execute, some dont. Some directories need write privileges, most dont. I reached the point where I was setting the protections on individual files to get them set properly, now I want to copy the protections. The best way I can see to do that is to read in the protections on each file under ORACLE_HOME and write out a shells script that sets the protections for each file.                                                                           

                        On 10/31/07, Mercadante, Thomas F (LABOR) < Thomas.Mercadante_at_labor.state.ny.us
<mailto:Thomas.Mercadante_at_labor.state.ny.us> > wrote:

                                Andrew,                                  

                                You can do this recursively by using the -R option:                                  

                                chmod -R g-w $ORACLE_HOME                                  

                                Tom


                                From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Andrew Kerber

                                Sent: Wednesday, October 31, 2007 9:41 AM

				To: oracle-l
				Subject: shell script needed
				
				
				
				I am looking for a unix shell script I
can use that will generate another script that will set the protections on the files in my oracle home directory. I want all the protections on all the files of a specific oracle version to be the same, and the best way to do that would seem to be to just generate the the commands by looking at the protections on one oracle home and generating the commands to reproduce that in other oracle homes.                                 

                                I know the priviliges we use are not the standard that oracle sets it on installation because I had to change some files to get BMC Patrol to work properly, and of course I did not think to write down every change I made to get it to work.                                 

                                Does anyone have a shell script to do this?                                 

				-- 
				Andrew W. Kerber
				
				'If at first you dont succeed, dont take
up skydiving.'
			-- 
			Andrew W. Kerber
			
			'If at first you dont succeed, dont take up
skydiving.'
		-- 
		                           Vincent Verpoort
		
	
,.-~`"'~-.,_,.-~`"'~-.,_,.-~`"'~-.,_,.-~`"'~-.,_,.-~`"'~-.,_ 
		              Communiceren is begrepen worden 
	

^*<-._,.->*^*<-._,.->*^*<-._,.->*^*<-._,.->*^*<-._,.->*^*<-.                                  

	-- 
	Andrew W. Kerber
	
	'If at first you dont succeed, dont take up skydiving.' 




-- 
Andrew W. Kerber

'If at first you dont succeed, dont take up skydiving.' 

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Oct 31 2007 - 12:15:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US