Solved

zipping files

Posted on 1997-08-29
8
308 Views
Last Modified: 2010-04-21
Is there a command to have all my html files zipped up for storage andr future download (copys not add/delete)?
0
Comment
Question by:bstorm
  • 4
  • 2
  • 2
8 Comments
 
LVL 84

Expert Comment

by:ozo
Comment Utility
zip html.zip *.html

tar cBf - *.html | gzip > html.tar.gz


0
 
LVL 2

Accepted Solution

by:
theTerabyte earned 50 total points
Comment Utility
I always forgot the command to unzip them- you'll need that too!
if you use the tar command to compress them, use this command to uncompress them:
tar -xvf html.tar.gz /target_path
hope you feel like giving up some points for this tidbit sccince ozo gave the ans away(like 10 or 20) but you don't have to obviously.

HOPE THIS HELPS!  Terabyte
0
 
LVL 84

Expert Comment

by:ozo
Comment Utility
Or if you don't have a tar that knows about .gz files, you might use:

zcat html.tar.gz | (cd /target_path; tar xBf -)

0
 
LVL 2

Expert Comment

by:theTerabyte
Comment Utility
had to oneup me, eh?  oh well, i don't know as much about UNIX as i'd like to anyway....
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 84

Expert Comment

by:ozo
Comment Utility
No, I learned something too.
I just noticed in the gzip man pages a mention that gnu tar
has a -z option for compressed archives...

 

0
 

Author Comment

by:bstorm
Comment Utility
here's part of the telnet log...
rapidnet: {6} % zip html.zip *.html
zip: No match.
rapidnet: {7} % tar cBf - *.html | gzip > html.tar.gz
tar: No match.
rapidnet: {8} % man gzip ....so..neither of these worked...will read the manual when I get a chance...
am quite afraid of creating a Zip that will replace them instead of merely adding them to an arcive...couldn't get this to oze...
0
 
LVL 84

Expert Comment

by:ozo
Comment Utility
> rapidnet: {6} % zip html.zip *.html
> zip: No match.
This error looks like it means that there are no *.html files in your cwd
are the files named *.html?

What if you say
zip html.zip pathtohtmlfiles/*.html
?

or
cd pathtohtmlfiles
zip html.zip *.html

But is your fear that it will replace files already in an exixting zip archive?
I had previously understood your fear to be that it would
remove the original files when it created the archive.

In either case, perhaps your fear could be aleviated by making
a copy in another directory of the files you don't want to be
overwritten?
 
0
 

Author Comment

by:bstorm
Comment Utility
ozo deserves the grade of A ..as his answer was correct, I hadn't changed directories to where they were, but when I did, his command worked perfectly. For some reason I can't give ozo the credit, so this will make 100 points spent trying to get him his credit.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now