08-19-2006
sorry I must not have explained properly... all I am trying to do at this point is compress using 3 ways... zip, gzip and compress... and output the results into a file for comparison... which I will use awk to output the results sorted by best compression...
... a single file only
this is just an exercise and I'm not looking for code but rather general advice on how to go about it
thanks for the response anyway
Last edited by nortypig; 08-19-2006 at 07:54 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hey......
i hav the follwing scripts needs to run parallel, so i made it as follows,
$HPath/start_script.sh 20 &
$HPath/start_script.sh 03 &
$HPath/start_script.sh 01 &
$HPath/start_script.sh 12 &
then once all these above got completed successfully i have to run
... (3 Replies)
Discussion started by: manas_ranjan
3 Replies
2. UNIX for Dummies Questions & Answers
Hi all,
i have a following folder call 'zz'. This 'zz' folder is found in the following directories.
I would like to delete the zz in the following directories
/aa/zz
/aa/bb/cc/zz
/aa/bb/cc/dd/zz
/aa/bb/cc/dd/ee/zz
and keep the zz folder in the following directories
/WW/zz
... (1 Reply)
Discussion started by: new2ss
1 Replies
3. Programming
How to achieve SERIALIZATION in Unix , C, C++
Write Objects directly to disk and read back ? (1 Reply)
Discussion started by: Sivaswami
1 Replies
4. Shell Programming and Scripting
hi to all,
i have the input(text file) like the below...
Header
1,2,3
4,5,6
7,8,9
Footer
i need a output(text file) like the below...
Header,1,2,3,Footer
Header,4,5,6,Footer
Header,7,8,9,Footer
please help me to find out? (2 Replies)
Discussion started by: aaha_naga
2 Replies
5. HP-UX
Hi all,
I have a master shell which will be running in cron tab.It will pick the files from certain directory and call subshell (Child Shell).This subshell / Child Shell runs in the background.
My problem is once if the master shell picks the file and passes it to subshell,it should go to... (6 Replies)
Discussion started by: cskumar
6 Replies
6. UNIX for Dummies Questions & Answers
Hi All !
We have to compress a big data file in unix server and transfer it to windows and uncompress it using winzip in windows.
I have used the utility ZIP like the below.
zip -e <newfilename> df2_test_extract.dat
but when I compress files greater than 4 gb using zip utility, it... (4 Replies)
Discussion started by: sakthifire
4 Replies
7. Shell Programming and Scripting
Hi,
Here is my requirement.
Currently, there is a function which gets called in a for loop 2 times.
doCopy() {
cp /src/a*.jar /target/
cp /src/b*.jar /target/
cp /src/c*.jar /target
}
Since it is called sequentially from the for loop, I was asked to make parellel copy to... (7 Replies)
Discussion started by: kgsrinivas
7 Replies
8. Shell Programming and Scripting
Hi all
I have the following which is part of a larger interactive script for adding virtual hosts to Apache's configuration (it was built for non-technical administrators). I'm curious as to whether there is a simpler way of achieving the same thing. All it does is look into the... (3 Replies)
Discussion started by: mlott
3 Replies
9. UNIX for Advanced & Expert Users
in AIX ,HP Unix and in SUN solaris,
how to find the logs by date and time, I mean , Logs which have been generated or updated
most recently , which might be present in folders and sub folders, I need to get the list of these Logs
along with location path.
Example:
========
folder... (3 Replies)
Discussion started by: sidharthmellam
3 Replies
10. Shell Programming and Scripting
Is there any i can achieve entity escaping, URL escaping & UTF-8 encoded for the xml generated through shell script?
#! /bin/bash
echo "<path>" >> file.xml
for x in `ls filename*`
do
echo -e "\t<dir>" >> file.xml
echo -e "\t\t<file>$x</file>" >> file.xml... (0 Replies)
Discussion started by: vel4ever
0 Replies
GZIP(1) BSD General Commands Manual GZIP(1)
NAME
gzip -- compression/decompression tool using Lempel-Ziv coding (LZ77)
SYNOPSIS
gzip [-cdfhlNnqrtVv] [-S suffix] file [file [...]]
gunzip [-cfhNqrtVv] [-S suffix] file [file [...]]
zcat [-fhV] file [file [...]]
DESCRIPTION
The gzip program compresses and decompresses files using Lempel-Ziv coding (LZ77). If no files are specified, gzip will compress from stan-
dard input, or decompress to standard output. When in compression mode, each file will be replaced with another file with the suffix, set by
the -S suffix option, added, if possible. In decompression mode, each file will be checked for existence, as will the file with the suffix
added.
If invoked as gunzip then the -d option is enabled. If invoked as zcat or gzcat then both the -c and -d options are enabled.
This version of gzip is also capable of decompressing files compressed using compress(1) or bzip2(1).
OPTIONS
The following options are available:
-1, --fast
-2
-3
-4
-5
-6
-7
-8
-9, --best These options change the compression level used, with the -1 option being the fastest, with less compression, and the -9
option being the slowest, with optimal compression. The default compression level is 6.
-c, --stdout, --to-stdout
This option specifies that output will go to the standard output stream, leaving files intact.
-d, --decompress, --uncompress
This option selects decompression rather than compression.
-f, --force This option turns on force mode. This allows files with multiple links, overwriting of pre-existing files, reading from or
writing to a terminal, and when combined with the -c option, allowing non-compressed data to pass through unchanged.
-h, --help This option prints a usage summary and exits.
-l, --list This option displays information about the file's compressed and uncompressed size, ratio, uncompressed name. With the -v
option, it also displays the compression method, CRC, date and time embedded in the file.
-N, --name This option causes the stored filename in the input file to be used as the output file.
-n, --no-name This option stops the filename and timestamp from being stored in the output file.
-q, --quiet With this option, no warnings or errors are printed.
-r, --recursive This option is used to gzip the files in a directory tree individually, using the fts(3) library.
-S suffix, --suffix suffix
This option changes the default suffix from .gz to suffix.
-t, --test This option will test compressed files for integrity.
-V, --version This option prints the version of the gzip program.
-v, --verbose This option turns on verbose mode, which prints the compression ratio for each file compressed.
ENVIRONMENT
If the environment variable GZIP is set, it is parsed as a white-space separated list of options handled before any options on the command
line. Options on the command line will override anything in GZIP.
SEE ALSO
bzip2(1), compress(1), xz(1), fts(3), zlib(3)
HISTORY
The gzip program was originally written by Jean-loup Gailly, licensed under the GNU Public Licence. Matthew R. Green wrote a simple front
end for NetBSD 1.3 distribution media, based on the freely re-distributable zlib library. It was enhanced to be mostly feature-compatible
with the original GNU gzip program for NetBSD 2.0.
This manual documents NetBSD gzip version 20040427.
AUTHORS
This implementation of gzip was written by Matthew R. Green <mrg@eterna.com.au>.
BSD
June 18, 2011 BSD