Sponsored Content
Full Discussion: Gzip
Top Forums Shell Programming and Scripting Gzip Post 302746691 by Froob on Wednesday 19th of December 2012 10:12:58 PM
Old 12-19-2012
Gzip

Code:
if [ $(stat --printf="%s" /var/log/mrnet.log ) -gt 5000 ] ;then
     echo "mrnet greater 5000"
     gzip /var/log/mrnet.log  /var/log/mrnet.log.1.gz
      
   fi

i'm looking if mrnet.log is bigger then 5000
then compress mrnet.log to mrnet.log.1.gz but it won't compress.

Last edited by Franklin52; 12-20-2012 at 03:12 AM.. Reason: Please use code tags for data and code samples
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

using gzip

Hi, I am trying to unzip a file that I unmounted onto a unix machine from a cd I had burned in a Windows machine. The file I am trying to unzip is a .tar file... it was originally a .tar.gz file because it was zipped using gzip. I have tried: % gzip -d hpux.tar (where hpux.tar is the file... (2 Replies)
Discussion started by: nattie_h
2 Replies

2. UNIX for Dummies Questions & Answers

GZIP help, please!

Gurus, My own stupidity (or ignorance...or both) put me in the situation I am in and I need help please: 1-My shell account (OS: HP UX v11) contains several work directories (/docs, /scripts...) 2-Our sysadmin has implemented aggressive disk quotas so I have to compress the files I put here... (2 Replies)
Discussion started by: alan
2 Replies

3. SCO

gzip

ciao a tutti, premesso che sono un principiante di unix, avrei bisogno di gzip/gunzip e SOPRATTUTTO delle istruzioni (ahimè dettagliatissime, come per un bimbo!) per installarlo... grazie mille, ciao (1 Reply)
Discussion started by: mfran2002
1 Replies

4. UNIX for Dummies Questions & Answers

gzip

Hi All, I have some files which are 01.tar.gz, 02.tar.gz,03.tar.gz ........30.tar.gz. when I want to extract the files I 'm using this command "gzip -dc *.tar.gz | tar -xvf -" but it just uncompress 01.tar.gz how can I uncompress all of them ? thanx alice (2 Replies)
Discussion started by: alisevA3
2 Replies

5. UNIX for Advanced & Expert Users

gzip with timestamp

Hi all, I have a file(Say x) and need to zip using gzip with the date&Timestamp(Something like x01012007.......) . Can you please tell me the command. Thanks (2 Replies)
Discussion started by: lijju.mathew
2 Replies

6. Shell Programming and Scripting

Gzip help

Hi Experts!! I was creating a zip file in a server which had zip installed in it. I have another server in which zip is not there and i am instructed to make use of gzip to compress files. I would need your help to know the way to create a gzip file. 1) I do the following to create the zip... (5 Replies)
Discussion started by: ganga.dharan
5 Replies

7. Shell Programming and Scripting

gzip

Hi, I want to gzip files in loop. for i in `ls *.xml`; do gzip $i; done But i am gettin error like "/usr/bin/ls: Arg list too long" Also please tell me how to do it with while loop and also using find and then exec. (7 Replies)
Discussion started by: tushar_tus
7 Replies

8. UNIX for Advanced & Expert Users

gzip vs pipe gzip: produce different file size

Hi All, I have a random test file: test.txt, size: 146 $ ll test.txt $ 146 test.txt Take 1: $ cat test.txt | gzip > test.txt.gz $ ll test.txt.gz $ 124 test.txt.gz Take 2: $ gzip test.txt $ ll test.txt.gz $ 133 test.txt.gz As you can see, gzipping a file and piping into gzip... (1 Reply)
Discussion started by: hanfresco
1 Replies

9. Shell Programming and Scripting

Help with GZIP

Hi Gurus, I have a requirement to zip a file using gzip and ftp it to target server. I am using a gzip script as below. gzip.sh #!/bin/ksh /usr/bin/gzip -9 $1 Filename for gzip.sh is passed by an application program. so the output for ./gzip.sh Test_YYYYMMDDHHMMSS.txt (file name is... (1 Reply)
Discussion started by: PRVARMA
1 Replies

10. Shell Programming and Scripting

gzip

how to zip all log file in a folder expect the latest gzip * ---> will zip all log files but I don't want the latest file to be zipped ex: file1, file2, file3, file4, file5 any single command to gzip all files excpet file5 ? (2 Replies)
Discussion started by: rmann
2 Replies
isdnlog(5)						    Linux System Administration 						isdnlog(5)

NAME
/var/log/isdn.log - isdn log file DESCRIPTION
The main purpose of isdnlog is to create a log file with information about all incoming and outgoing calls, namely: this file. The file has 19 fields, separated by pipe characters "|" with fixed length. The fields are: 1 Time of connect 2 Caller's number (if transmitted) 3 Called number 4 Duration of connection in seconds 5 Duration of connection in 1/100 seconds 6 Time of connect (as usual in seconds since 1970) 7 Number of charge signals received (-1 if you don't get charge signals) 8 I = Incoming or O = Outgoing 9 Cause Code if connection was not established 10 Number of bytes transferred (incoming) 11 Number of bytes transferred (outgoing) 12 Version number of isdnlog 13 ISDN Service Code 14 1 = called by isdn user, 0 = called by analog user 15 Costs per charge unit (e.g. 0.062 in Germany) 16 Currency of charge unit (e.g. EUR in most parts of Europe) 17 Total cost of connection 18 Provider 19 Zone FILES
/var/log/isdn.log This file: isdnlog log file. SEE ALSO
isdnlog(8) AUTHOR
This manual page was written by Andreas Jellinghaus <aj@dungeon.inka.de>, for Debian GNU/Linux and isdn4linux. Now maintained by Paul Slootman <paul@debian.org>. ISDN 4 Linux 3.13 2002/01/31 isdnlog(5)
All times are GMT -4. The time now is 05:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy