Operating System - HP-UX
1752569 Members
5107 Online
108788 Solutions
New Discussion юеВ

Re: copy and gzip at the same time.

 
SOLVED
Go to solution
someone_4
Honored Contributor

copy and gzip at the same time.

Hello everyone,

I have seen a post about this but I cant seem to find it. But how can I copy and gzip at the same time.

thanks
Richard
4 REPLIES 4
Andreas Voss
Honored Contributor
Solution

Re: copy and gzip at the same time.

Hi,

when doing eg.:

cp /srcpath/file /destpath/file

you could to with zipping:

cat /srcpath/file | gzip -c >/destpath/file.gz

Regards
Patrick Wallek
Honored Contributor

Re: copy and gzip at the same time.

Something like this:

# gzip < /path/to/original_file > /newpath/to/original_file.gz

Robin Wakefield
Honored Contributor

Re: copy and gzip at the same time.

Hi Richard,

gzip -c file > file.gz

rgds, Robin
Tom Jackson
Valued Contributor

Re: copy and gzip at the same time.