Solved

oracle unix command

Posted on 2011-09-16
6
459 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
  • 3
  • 2
6 Comments
 
LVL 76

Accepted Solution

by:
arnold earned 500 total points
Comment Utility
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
Comment Utility
If I need more info about |() what is it called?
0
 
LVL 76

Expert Comment

by:arnold
Comment Utility
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 6

Expert Comment

by:tangchunfeng
Comment Utility
same as

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

Expert Comment

by:arnold
Comment Utility
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
Comment Utility
Great thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now