Link to home
Start Free TrialLog in
Avatar of it-rex
it-rex

asked on

oracle unix command

what does this command do?

tar -cf - asm | (cd /u01/app/oracle/product/11.1/;tar -xf - )
ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of it-rex
it-rex

ASKER

If I need more info about |() what is it called?
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.
same as

cp -R asm /u01/app/oracle/product/11.1/
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.
Avatar of it-rex

ASKER

Great thanks