10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
I am creating a script to run the SysInfo tool under HPUX servers, this is my script!
#!/usr/bin/ksh
#
# Date: February 29th 2011
#
#Definicion de variables
PATH_TMP=/home/eponcede
> HPUX_SysInfo.log
for host in `cat $PATH_TMP/servers/host_hp2_test`
do
echo... (2 Replies)
Discussion started by: eponcedeleonc
2 Replies
3. Shell Programming and Scripting
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
4. UNIX for Advanced & Expert Users
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
5. Programming
Hi all...
I have the following code:
FILE *fp = popen(" gzip -dc /somemount/somefile.gz", "r");
while(fgets(buffer, 1024, fp))
{
some code....
}
"/somemount" is a mount of some network drive. Sometimes error occurs in while loop - I can see the following "Input/Output error"... (4 Replies)
Discussion started by: adm1n
4 Replies
6. Shell Programming and Scripting
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
7. UNIX for Dummies Questions & Answers
Hi,
I am getting this error
gunzip file1.tar.Z
gunzip: file1.tar.Z: not in gzip format
Any clues? This goes bad only in some recent installations of ids (5 Replies)
Discussion started by: eagercyber
5 Replies
8. AIX
I have two huge files on AIX Ver 5.0. File size of each file is 6238884375 bytes. There is huge difference in sizes when I zip them by gzip coomand.
File1.gz 586147513
File2.gz 547585695
Any idea why it is so?
Thanks
Sumit (2 Replies)
Discussion started by: sumitc
2 Replies
9. Shell Programming and Scripting
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
10. UNIX for Advanced & Expert Users
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