LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-19-2005, 05:02 PM   #1
Blaumieser
Member
 
Registered: Sep 2003
Distribution: aptosid
Posts: 40
Blog Entries: 4

Rep: Reputation: 15
unzip and keep original file ?


Hi all,
this problem seems very small but I cannot find a solution: When using unzip on an regular zip-file the contents are extracted and the original zip file is gone. I want to extract and keep the original file. How can this be done besides always making a copy with another name or in another place? There seems to be no option mentioned in the corresponding man page...

Thanks in advance
BM
 
Old 09-19-2005, 05:09 PM   #2
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
unzip does keep the original zipfile, unless you're using gzip? But then that doesn't handle multiple files to compress (hence it's used with tar).
 
Old 09-20-2005, 05:02 PM   #3
Blaumieser
Member
 
Registered: Sep 2003
Distribution: aptosid
Posts: 40

Original Poster
Blog Entries: 4

Rep: Reputation: 15
Oh, didn't know that. Yes, I used gzip but I thought zip behaved like gzip. I will investigate further if there is an option to tar xzf that keeps the original...

Thanks!
BM
 
Old 09-20-2005, 05:29 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
tars z option also won't delete the tarball. The only real concern is
with using gunzip on a .gz file. And that can be fixed by using
gunzip -c blurb.gz > blurb


Cheers,
Tink
 
Old 09-21-2005, 02:56 PM   #5
Blaumieser
Member
 
Registered: Sep 2003
Distribution: aptosid
Posts: 40

Original Poster
Blog Entries: 4

Rep: Reputation: 15
... cool! That's a nice trick.

Thanks again!
BM
 
Old 09-21-2005, 03:24 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Heh - it's not really a trick, it automatically follows from
reading the man-page ;}


Cheers,
Tink
 
  


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
how do i unzip a .gz file? xstealthrtx Linux - General 3 01-20-2005 12:26 PM
Why can't I unzip a .tar.gz file Dewar Linux - Software 8 09-18-2003 04:07 PM
File Unzip Errors sbb Linux - Newbie 3 08-29-2003 03:57 PM
Can't unzip a file GhostOfYoda Linux - Newbie 4 07-27-2003 10:04 AM
unzip a tar.gz file klfreese Linux - Newbie 1 07-22-2003 11:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:49 AM.

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