Sponsored Content
Top Forums Shell Programming and Scripting Facing issues with tar and gzip ! Post 302668517 by acidburn_007 on Monday 9th of July 2012 10:46:25 AM
Old 07-09-2012
Facing issues with tar and gzip !

Hi,
I am trying to :-
(1.) Tar the file and then
(2.) Gzip it !

HTML Code:
Tar command :-
 
tar -cvf BLUESTAR_Archive.log_$(date +%y_%m_%d_%H_%M).tar  /app/local/XXX/XXX/XXX/logs
 
 
Gzip command :-
 
Gzip  /app/local/XXX/XXX/XXX/logs/BLUESTAR_Archive.log_$(date +%y_%m_%d_%H_%M).tar 
 
Bothe of these commands are working fine but the problem is regarding the file size.

After doing the tar and gzip operation the size of the file keeps on increasing which is expected to be less or same as the previous gzip files.

HTML Code:
Extract :-
 
-rw-r--r--  173471   Jul  9 13:03 BLUESTAR_Archive.log.log_12_07_09_13_03.tar.gz
-rw-r--r--  318456   Jul  9 13:14 BLUESTAR_Archive.log.log_12_07_09_13_14.tar.gz
-rw-r--r--  1031131 Jul  9 13:15 BLUESTAR_Archive.log.log_12_07_09_13_15.tar.gz
-rw-r--r--  1523045 Jul  9 13:16 BLUESTAR_Archive.log.log_12_07_09_13_16.tar.gz
-rw-r--r--  3020915 Jul  9 13:18 BLUESTAR_Archive.log.log_12_07_09_13_18.tar.gz
 
The size of the parent file doesn’t increase beyond 2000000 !!!!!

I am not able to understand that why the size of the files after gzip keeps on increasing when the size of the parent file doesn’t increase beyond 2000000 !!!!

When I delete the older logs the gzip again starts behaving in the same fashion i.e the 1st file of less size and gradually the size of files increases like the above one .
I am very surprised by this behavior !

Could anyone please help me to understand the problem or is there something wrong with my logic or way of doing it !!!!

Is there any other command similar to tar and gzip ??

Please help.

Regrads.

Last edited by acidburn_007; 07-10-2012 at 04:24 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

can i tar and gzip in one liner ?

hello can i combine this 2 commands in one liner command? (1 Reply)
Discussion started by: umen
1 Replies

2. UNIX for Dummies Questions & Answers

TAR and GZIP help

Hi, There are 700 .pdf files in a certain directory on the server and I need to TAR them first and then compress them using GZIP to free up the space. The combined size of the .pdf files is 3gb. However, there is only 1gb of free space on the server. So as you can see when I try to TAR these... (3 Replies)
Discussion started by: VandeMatram
3 Replies

3. UNIX for Advanced & Expert Users

tar/gzip/gz...which one to use?

P0251WLADC.svm_wl1 > /svm_wl1/billing/data/server/archive/ALLEVT $ du -k FEB2006 22050224 FEB2006 As you can see,i have a folder called "FEB2006" which is around 22 GB. i guess zip or compress wont work...( i don know how do we compress a folder) i wished to use ""tar" ( i suppose... (5 Replies)
Discussion started by: abhijeetkul
5 Replies

4. UNIX for Dummies Questions & Answers

tar and gzip

Hi, I would like to have a combined gzip and tar that will compress and create multiple output tar.gz files. I want to have multiple files output because i cannot create an archive because there is no more space on my harddisk. I cannot transfer it locally because of slow connection. I want to... (3 Replies)
Discussion started by: tungaw2004
3 Replies

5. UNIX for Advanced & Expert Users

tar and gzip extraction issues

Not sure if this is really in the right forum but here goes.... Looking for a way to extract individual compressed files from a compressed tarball WITHOUT tar -zxvf and then recompressing. Basically we need to be able to chunk out an individual compressed file while it still remains... (6 Replies)
Discussion started by: athos
6 Replies

6. UNIX for Dummies Questions & Answers

Facing issues while running a cronjob !

Hi, I am trying to run a cronjob. But while doing so I am getting the following error message :- can't open yourfile in /var/spool/cron/crontabs directory. No such file or directory How can I resolve this issue ? Please help. Thanks Please view this code tag video for... (14 Replies)
Discussion started by: acidburn_007
14 Replies

7. Shell Programming and Scripting

Facing issues with cronjobs

Hello Everyone, We have a cronjob scheduled to pick up files from one system and transfer to another system. the underlying code is a shell script. These cronjobs were working correctly until sometime. 2 days back they did not pick up the scripts but created empty logs. However when we tried... (6 Replies)
Discussion started by: Rads
6 Replies

8. Post Here to Contact Site Administrators and Moderators

Regarding facing issues while accessing UNIX.com site

Hello Moderators/Admins, This is regarding an issue which I am facing from last 7 to 8 days. Issue is while trying to access this forum(simple hitting http://unix.com) I am able to login but many times my request gets timed out or 404 error or if I am able to login it will be excessive slow even... (0 Replies)
Discussion started by: RavinderSingh13
0 Replies

9. Shell Programming and Scripting

Facing issues with rsync

Hello Gurus, I am running rsync command to copy certain Directories and files into that directories to remote server. While ruuning the command all teh files has been copied but I am facing error. The below command I am executing to copy Directories and files to remote server: rsync -avrz ssh... (3 Replies)
Discussion started by: pokhraj_d
3 Replies

10. Shell Programming and Scripting

Facing issues with shell script changes

My current requirement is to replace xxyxx string with value of date date1 variable holds a date and the current script writes html tags to a file as follows echo date1 nawk 'BEGIN{ FS="," print "<HTML>""<HEAD>""<p>Hi All,<br><br>There are no cases closed on the xxyxx" print ... (2 Replies)
Discussion started by: Rajesh A S
2 Replies
ACTDIAG(1)						      General Commands Manual							ACTDIAG(1)

NAME
actdiag - generate activity-diagram image file from spec-text file. SYNOPSIS
actdiag [options] files DESCRIPTION
This manual page documents briefly the actdiag commands. actdiag is a program that generate activity-diagram image file from spec-text file. OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. For a complete description, see the Info files. -h, --help show this help message and exit -a, --antialias Pass diagram image to anti-alias filter -c FILE, --config=FILE read configurations from FILE -o FILE write diagram to FILE -f FONT, --font=FONT use FONT to draw diagram -s, ----separate Separate diagram images for each group (SVG only) -T TYPE Output diagram as TYPE format SEE ALSO
The programs are documented fully by http://tk0miya.bitbucket.org/actdiag/build/html/index.html AUTHOR
actdiag was written by Takeshi Komiya <i.tkomiya@gmail.com> This manual page was written by Kouhei Maeda <mkouhei@palmtb.net>, for the Debian project (and may be used by others). June 5, 2011 ACTDIAG(1)
All times are GMT -4. The time now is 01:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy