Sponsored Content
Top Forums UNIX for Dummies Questions & Answers gzip produces different output from the same input Post 302433291 by chebarbudo on Tuesday 29th of June 2010 07:14:37 AM
Old 06-29-2010
Thanks pludi.
The thing is that I ran gzip for the exact same file twice:
Code:
santiago:~$ cp original copy
santiago:~$ gzip copy
santiago:~$ md5sum copy.gz
603343de9a6c295f00dc4759f6919031  copy.gz
santiago:~$ rm copy.gz
santiago:~$ cp original copy
santiago:~$ gzip copy
santiago:~$ md5sum copy.gz
e4da2538a243cb49cf6212a0a20a60ce  copy.gz

How can it be different?
 

10 More Discussions You Might Find Interesting

1. Linux

vgscan produces no output using file descriptors on Oracle Enterprise Linux.

I wrote a simple program which will create a child process to execute a command and the output will be redirected to the file. Please have a look at the following code -> #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <fcntl.h> void execute(char **argv) { ... (0 Replies)
Discussion started by: sandiworld
0 Replies

2. Shell Programming and Scripting

Dynamic output file generation using a input text file with predefined output format

Hi, I have two files , one file with data file with attributes that need to be sent to another file to generate a predefined format. Example: File.txt AP|{SSHA}VEEg42CNCghUnGhCVg== APVG3|{SSHA}XK|"password" AP3|{SSHA}XK|"This is test" .... etc --------- test.sh has... (1 Reply)
Discussion started by: hudson03051nh
1 Replies

3. Shell Programming and Scripting

Using piped input to gzip

Can anyone tell me why does'nt the following command work? find /gfp1/home/arijit -name "*.sas7bdat" | gzip I am trying to compress all files with extension sas7bdat with gzip. It gives error message gzip: compressed data not written to a terminal. Use -f to force compression.... (5 Replies)
Discussion started by: bs0409
5 Replies

4. 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

5. Shell Programming and Scripting

Redirect output to tar.gzip

I would like to make a listing of files in a large directory and output it to tar.gz. Is it possible to do this in one command? For example; I would like the text output from this command to be outputted to a directory.tar.gz file. ls -al -R /bigdir Is it possible to do it in memory... (5 Replies)
Discussion started by: lewk
5 Replies

6. UNIX for Dummies Questions & Answers

linux sort command produces strange output

cat a .a ba .b bb .c bc sort a .a .b ba bb bc .c NOTE: .a and .b appears before ba and bb, where as .c appears after bc. In general (3 Replies)
Discussion started by: ajb
3 Replies

7. Shell Programming and Scripting

Need a shell script to compare two directories and produces the output

Hi, I am using solaris OS 10 and Bash shell.I need a script which will compare the two directories and produces the output. Step 1: In detail say suppoose I have machine one and have a directory dir1. Script should iterate through the directories and subdirectories inside and produce the output... (10 Replies)
Discussion started by: muraliinfy04
10 Replies

8. AIX

Gzip status output is not redirecting.

Dear all I am facing issue in one part of my script. in this part i am trying to zip the files but want the status to be redirected to a text file YAMVASSRV02_vas> YAMVASSRV02_vas> cat final_col.sh gzip -cv /data01/oracle/oradata/vas/control/control01.ctl > ... (2 Replies)
Discussion started by: javeedkaleem
2 Replies

9. Shell Programming and Scripting

awk runs and produces output but with error

When I run the awk below, I get an error message awk -v OFS='\t' '$(NF-1)=="Benign" || ($(NF-2) OFS $(NF-1))=="Likely Benign" {$(NF)=$(NF-2) OFS $(NF-1)} {print $0 }' input awk: cmd. line:1: (FILENAME=VUS FNR=8) fatal: attempt to access field -1 input Chr Start End Ref ... (6 Replies)
Discussion started by: cmccabe
6 Replies

10. Shell Programming and Scripting

Printing the output of a gzip command intact

how can i get the printf command or the echo command to print the data that are inbetween the first and the last quotes? #!/bin/sh printf '%s\n' "^_<8b>^H^@U<8c>MX^@^Cí=ÙzÚH<97>×ð^Teìn<8c>Ób_<9d><9f>dXd<9b>^N^F7<82>8qâÎ'^K^Y^T<83>D<90>°M^Lý^Hó^Fs5w3ß|s5/ÐýbS%©<84>^DBH... (4 Replies)
Discussion started by: SkySmart
4 Replies
bp_copyout(9F)						   Kernel Functions for Drivers 					    bp_copyout(9F)

NAME
bp_copyout - copy from a driver buffer into a buf(9S) SYNOPSIS
#include <sys/types.h> #include <sys/buf.h> int bp_copyout(void *driverbuf, struct buf *bp, offset_t offset, size_t size); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). PARAMETERS
bp Pointer to the buffer header structure to copy to. driverbuf Driver buffer to copy from. offset Offset into bp where to start copying. size Size of copy. DESCRIPTION
The bp_copyout() function copies size bytes starting from the driver buffer driverbuf to offset bytes into the memory associated with bp. The offset only applies to bp. RETURN VALUES
Under normal conditions, 0 is returned to indicate a successful copy. Otherwise, -1 is returned if bp references invalid pages. CONTEXT
The bp_copyout() function can be called from user or kernel context only. SEE ALSO
bp_copyin(9F), bp_mapin(9F), bp_mapout(9F), ddi_copyout(9F), buf(9S) SunOS 5.11 16 Oct 2007 bp_copyout(9F)
All times are GMT -4. The time now is 08:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy