Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 954
  • Last Modified:

Adding/Replacing file in existing zip archive on FreeBSD.

Hi,

I have a large (100MB) zip file on a remote host in the hosting company and I need to replace one of the files inside this archive.

I have on this host:

tar and gzip.

The question is how? I need an exact FreeBSD syntax.

Thanks.
0
muhalok
Asked:
muhalok
  • 2
1 Solution
 
surya_prabhakarCommented:
what is the extension of the file .

unpacking
-----------------
If it is only a zip file ( zipped with gzip) you will have an extension like

name.gz

then you unzip it as gunzip filename.gz

If it is a name which is tarred as well as zipped with (gzip) you will have an extension like

name.tar.gz  or filename.tgz
then you unzip it as

gunzip name.tar.gz
then
tar -xvf name.tar
-------------------------------------------
to Zip it back

first tar it
tar -cvf name.tar filename
then
gzip name.tar

surya.
0
 
muhalokAuthor Commented:
Ye, that was obvious , thanks anyway.

I was looking for something like adding a file to zip archive (like in Windows - open archive and drag/drop files into it).
0
 
surya_prabhakarCommented:
are you connecting to some telnet kind of thing ? But I guess you have untar put the file in and re-tar it .
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now