su - oracle -c

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers su - oracle -c
# 1  
Old 02-23-2008
su - oracle -c

can anybody explain to me in detail the meaning of that -c to this command. su - oracle -c
# 2  
Old 02-23-2008
That command itself, if not followed by some other commands, is useless. For example:

su - oracle -c "ls -l"

It means:
1) Become the oracle user
2) Source the .profile (environment file)
3) Execute the command "ls -l"
4) Return control to the calling process

It is a syntax largely used in root's shell scripts for executing a command with another identity.

Oh, you should also try:
man su

Login or Register to Ask a Question

Previous Thread | Next Thread

1 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Identify a specific environment Oracle variable to connect a remote Oracle database ?

Good evening I nned your help pls, In an unix server i want to connect to a remote oracle databse server by sqlplus. I tried to find out the user/passwd and service name by env variable and all Ive got is this: ORACLE_SID_REPCOL=SCL_REPCOL ORACLE_SID=xmeta ORACLE_SID_TOL=SCL_PROTOLCOL... (2 Replies)
Discussion started by: alexcol
2 Replies
Login or Register to Ask a Question