Solved

# tar -cpvzf /home/oracle/db112.tgz . tar: illegal option -- z

Posted on 2013-06-25
6
1,629 Views
Last Modified: 2013-06-26
Hi experts.

Aix 6.1 - as root I can't do this, any ideas?

# tar -cpvzf /home/oracle/db112.tgz .
tar: illegal option -- z
0
Comment
Question by:LindaC
[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
6 Comments
 
LVL 9

Expert Comment

by:gt2847c
ID: 39276057
Looks like the built in AIX tar doesn't support the compression option.  You may have to go find a copy of GNU Tar or gzip the tar file.
0
 
LVL 8

Author Comment

by:LindaC
ID: 39276064
So how to execute is as tar -cvf <name>.tar?

What is the p for
What is the z for?
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 475 total points
ID: 39276070
Hi,

sad to say, but AIX' tar does not support the "-z" (=compress) option.

You could create your tar archive without this option and compress it afterwards, like

# tar -cpvf /home/oracle/db112.tar .
# compress /home/oracle/db112.tar

This will result in a compressed file /home/oracle/db112.tar.Z

AIX does not have gzip, so you must use "compress".

By the way, "-p" means "preserve permissions".

Alternatively, if you have root access and are allowed to install open source software you could get yourself GNU tar (which supports "-z") and install it.

It's here:

http://www.perzl.org/aix/index.php?n=Main.Tar

"gettext" is a prerequisite which you must install beforehand:

http://www.perzl.org/aix/index.php?n=Main.Gettext

Sorry, no better news!

wmp
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Assisted Solution

by:gt2847c
gt2847c earned 25 total points
ID: 39276092
-p preserves permissions on the file, but that's on the extract
-z (in those versions of tar that support it) is use gzip compression

a .tgz file is a gzipped tar file (by convention)

so:

-c = create
-v = verbose
-f = specify output or input filename depending on operation

tar -cvf filename.tar /directory/

Will create a a filename.tar file from whatever is in /directory/
0
 
LVL 8

Author Closing Comment

by:LindaC
ID: 39276128
Thank you!
0
 
LVL 48

Expert Comment

by:Tintin
ID: 39277249
You can do the equivalent of:

tar -cpvzf /home/oracle/db112.tgz .

with

tar -cpvf - . | gzip -c >/home/oracle/db112.tgz
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

710 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