Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

oracle unix command

Posted on 2011-09-16
6
Medium Priority
?
481 Views
Last Modified: 2012-05-12
what does this command do?

tar -cf - asm | (cd /u01/app/oracle/product/11.1/;tar -xf - )
0
Comment
Question by:it-rex
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 79

Accepted Solution

by:
arnold earned 2000 total points
ID: 36551584
tar -cf - asm creates an archive from data in asm and pipes it to standard output
tar -f - means the results will be output via standard output
 -c create
| () means treat the items in perenthesis as a single command.
cd means change to the directory
-xf - means extract the data from a file in this case the -f - means from the standard input stream.

The end result is that the data in asm is copied as is into /u01/app/oracle/product/11.1/asm

man tar
0
 
LVL 11

Author Comment

by:it-rex
ID: 36554023
If I need more info about |() what is it called?
0
 
LVL 79

Expert Comment

by:arnold
ID: 36554537
what do you mean.
| pipe means pass the data to the next application.
in the case of () this means that the data is being passed to the group which as your example shows it runs commands prior to the application that actually gets the data.
i.e. items in parenthesis are treated as a group.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 6

Expert Comment

by:tangchunfeng
ID: 36555831
same as

cp -R asm /u01/app/oracle/product/11.1/
0
 
LVL 79

Expert Comment

by:arnold
ID: 36556591
To slightly correct tangchunfeng, the cp will reflect the ownership of the copied files as those of the user running the copy while the tar | tar mechanism will maintain the original ownership/permissions.
i.e. tar | tar process is a mirror copy.
0
 
LVL 11

Author Closing Comment

by:it-rex
ID: 36559723
Great thanks
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question