AIX & TAR related stuff


 
Thread Tools Search this Thread
Operating Systems AIX AIX & TAR related stuff
# 15  
Old 08-28-2013
Quote:
Originally Posted by filosophizer
Now, if someone wants to check how much space is needed to untar and uncompress the file oraclebackup.tgz how can he check ?
You can't: because of he algorithm used there is no direct relation between the source and the target file size: if file X is bigger than file Y then X.gz might still be smaller than Y.gz. The only way to find out is to actually compress the file. The same is true for the other way round.

I hope this helps.

bakunin
# 16  
Old 08-28-2013
thanks bakunin,

the reason why I asked this question, when I use
Code:
gunzip < /backup1/oraclebackup.tgz | /opt/freeware/bin/tar -xvf-
/opt/freeware/bin/tar: oracle/prodappl/au/11.5.0/forms/AR/GMDSTAED.fmb: Wrote only 9728 of 10240 bytes
/opt/freeware/bin/tar: Skipping to next header
/opt/freeware/bin/tar: Archive contains obsolescent base-64 headers
/opt/freeware/bin/tar: Error exit delayed from previous errors

my 155GB filesystems fills up and tar exits,

but when i use the AIX tar to untar , it untars without any problems, and the filesystem after untar is 147GB where as using GNU tar , my filesystem becomes full at 155GB and exits. My filesystem capacity is 155GB ;

thanks.
# 17  
Old 08-28-2013
Quote:
Originally Posted by filosophizer
when I use
Code:
gunzip < /backup1/oraclebackup.tgz | /opt/freeware/bin/tar -xvf-

my 155GB filesystems fills up and tar exits,
Two minor corrections: first, tar is one of the few commands where "-" does NOT introduce options. Correct is:

Code:
tar xvf -

Still, i do not think this is pertinent to your problem.

Second: i am not sure if gunzip < /backup1 really extracts to stdout. I'd use the "-c" flag, which does that (extract to stdout), but then, this might be working too. RIght now i have no gunzip on AIX at hand to verify.

Regarding your problem: i have no idea. Which "tar"-version is installed in /opt/freeware?

I hope this helps.

bakunin
# 18  
Old 08-29-2013
tar version
Code:
/opt/freeware/bin/tar --version
tar (GNU tar) 1.14
Copyright (C) 2004 Free Software Foundation, Inc.
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute it under the terms of the GNU General Public License;
see the file named COPYING for details.
Written by John Gilmore and Jay Fenlason.

# 19  
Old 09-16-2013
16. List the contents of a tar file

Code:
$ tar -tvf file.tar

$ zcat file.tar.Z | tar tvf -


$ tar -ztvf file.tar.gz

$ tar -ztvf file.tar.gz > files.txt

note: -z will not work on AIX but will work on Linux , equivalent would be

$ gunzip < test.tgz | tar tvf -

$ tar -jtvf file.tar.bz2

# 20  
Old 09-16-2013
Quote:
Originally Posted by filosophizer
Code:
$ tar -tvf file.tar

We had that already: "tar tvf ....", without the dash.

Quote:
Originally Posted by filosophizer
note: -z will not work on AIX but will work on Linux
This has nothing to do with the OS, only with the tar-version you use: GNU-tar understands "z" (again: not "-z", but "z") andh "j", the AIX-tar (and any other POSIX-conformant "tar") does not. Linux has the GNU-tar installed by default, AIX the AIX-tar.

This is why i would never on "j" or "z" or any other non-standard subcommand and always would use:

Code:
$unpackprogram file | tar tvf -

Simply, because the extra feature may or may not be there, but this is guaranteed to work. Part of my work philosohpy is to avoid unnecessary risks. This is one - and one which is easily avoided, for that matter.

I hope this clears it up.

bakunin

Last edited by bakunin; 09-16-2013 at 10:57 AM..
This User Gave Thanks to bakunin For This Post:
# 21  
Old 09-16-2013
Quote:
Originally Posted by bakunin
We had that already: "tar tvf ....", without the dash.


I hope this clears it up.

bakunin
Thanks Bakunin, this dash thing is engraved in my head due to excessive use of linux. Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

GNU TAR vs NATIVE AIX TAR

Hello, Getting this very strange error, made tar/zip through gnu tar GNU Tar ( successful tar and zip without any errors ) /opt/freeware/bin/tar cvf - /oraapp| gzip > /backup/bkp_15_6_16_oraapp.tgz GNU unTar error root@test8:/>gunzip < /config1/bkp_15_6_16_oraapp.tgz |... (5 Replies)
Discussion started by: filosophizer
5 Replies

2. Shell Programming and Scripting

help with tar & zip only last months(say,Sep) files

Need to 1. archive all the files in a directory from the previous month into a tar/gz file, ignoring all already archived 'tar.gz' files 2. Check created .tar.gz file isnt corrupted and has all the required files in it. and then remove the original files. I am using a function to get the... (1 Reply)
Discussion started by: Prev
1 Replies

3. AIX

How to upgrade AIX Firmware & TL Maintenance Level in AIX

Steps to upgrade AIX TL ( technology Level ) / Maintenance Level in AIX ( including Firmware HMC VIOS ) This article or post covers upgrades for - Hardware Management Console ( HMC ) - Firmware ( also known as microcode ) - VIO ( Virtual I/O Server = PowerVM ) - AIX Version, Technology... (2 Replies)
Discussion started by: filosophizer
2 Replies

4. Solaris

Few things related to HBA port & fcinfo command

Hi Gurus I need to know few things related to HBA port & fcinfo command I have a server where there are 4 HBA ports cards are their. Out of 4 ports 2 are in use & 2 are not in use when I check it physicall. Now I want to know the command through which I can get information about all above... (6 Replies)
Discussion started by: girish.batra
6 Replies

5. Shell Programming and Scripting

How to compare 2 files & get only few columns based on a condition related to both files?

Hiiiii friends I have 2 files which contains huge data & few lines of it are as shown below File1: b.dat(which has 21 columns) SSR 1976 8 12 13 10 44.00 39.0700 70.7800 7.0 0 0.00 0 2.78 0.00 0.00 0 0.00 2.78 0 NULL ISC 1976 8 12 22 32 37.39 36.2942 70.7338... (6 Replies)
Discussion started by: reva
6 Replies

6. Solaris

Tar & Tape drive without media

Hi all, I would like to know what would happen if the tape (media) is not placed on the drive and a tar command is executed to backup on the tape. My problem is that tar command hanged for multiple days instead of throwing the error, Is it valid behaviour? I was unable to test the... (4 Replies)
Discussion started by: jmsathish
4 Replies

7. UNIX for Dummies Questions & Answers

tar & Grep together

Hi, I've got dozens of tar's with two files in each one, live_access_log & live_error_log (one tar for each day, backups). The probelm is i need to match a pattern in all of the archive_access_log files and output the line to a seperate file (All_access.log). I.e. I need to get details... (21 Replies)
Discussion started by: tom123
21 Replies

8. UNIX for Dummies Questions & Answers

disaster recover w/tar & find

Hi, I am creating a disaster recovery plan for my Linux 7.2 machine. I have two backups from my current machine. One created using the command tar -cvpf /dev/st0 --exclude=/proc --directory / . and one created with the command find / /boot /home -mount -path '/proc' -prune -o -print |... (4 Replies)
Discussion started by: jeremiebarber
4 Replies

9. UNIX for Dummies Questions & Answers

/dev/hd* ?? & HTFS .... What is this stuff?

# grep "Jul 3" syslog.messages | more Jul 3 00:16:03 www3 CPU3: NOTICE: HTFS: No space on dev hd (1/42) Jul 3 00:16:08 www3 CPU3: NOTICE: HTFS: No space on dev hd (1/42) Jul 3 00:17:01 www3 CPU2: NOTICE: HTFS: No space on dev hd (1/42) Jul 3 00:17:06 www3 syslogd: /usr/adm/debug: No space... (1 Reply)
Discussion started by: Cameron
1 Replies

10. Shell Programming and Scripting

Find & tar execution problem

I'm trying to set up a stanard sh script that will find all the files that have been changed within the last day and then tar them up. I think the command line should be something like : find /home/bob -atime +0 -exec \ tar cvf /home/bob/files.tar {}\; Help please ... Thanx (3 Replies)
Discussion started by: ianf
3 Replies
Login or Register to Ask a Question