Solved

oracle unix command

Posted on 2011-09-16
6
476 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 500 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
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 about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to recover a database from a user managed backup
Suggested Courses

617 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