LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-03-2002, 08:28 PM   #1
WindozBytes
Member
 
Registered: Aug 2001
Location: CT, USA
Distribution: Mandriva 2008
Posts: 105

Rep: Reputation: 15
gzip and leave the original file intact


I have two Linux machines and a very large ~1.5GB file on one of them. I want to be able to compress the data on LinuxA and copy the compressed file to LinuxB. Now for the tricky part. When I'm done with the compression/transfer, I still want the original (uncompressed) file to reside on LinuxA.

Is there a command syntax within gzip that essentially copies the data to a compressed file and leaves the original intact?

I could copy the data to LinuxA and compress it there, but would much prefer to transfer the compressed version. I could also copy the file to another location on LinuxA, compress it there, then move it to LinuxB, but that seems so inelegant.

Thanks for any help you can provide.
 
Old 09-04-2002, 12:07 AM   #2
kwigibo
Member
 
Registered: Apr 2002
Posts: 53

Rep: Reputation: 15
tar cvzf filename.tgz filename
or
tar -cvzf filename.tgz filename
 
Old 09-04-2002, 12:07 AM   #3
cyent
Member
 
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 398

Rep: Reputation: 87
gzip -c MONSTER > MONSTER.gz
 
Old 09-04-2002, 09:08 AM   #4
WindozBytes
Member
 
Registered: Aug 2001
Location: CT, USA
Distribution: Mandriva 2008
Posts: 105

Original Poster
Rep: Reputation: 15
Thanks, cyent. That's exactly what I needed. I don't know why I didn't see that when reading through the man pages....
 
Old 09-04-2002, 09:26 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
what on earth is this meant to have to do with programming??? please use the correct forums in future.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Solaris 8 gzip issues- cannot gzip -d lynx sixosix Solaris / OpenSolaris 4 03-13-2005 03:17 PM
gzip a directory into a file tcma Linux - Software 4 10-07-2004 02:51 AM
untar gzip file problem jmr0311 Linux - General 8 09-12-2004 04:32 PM
linux gzip file by date antonioxcom Linux - Newbie 4 07-12-2004 12:07 AM
How to gzip a file SnowSurfAir Linux - Software 5 07-31-2003 01:09 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration