Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

how to replace a file in a .zip fil

Original Message
Name: arun_s010
Date: July 28, 2006 at 00:21:00 Pacific
Subject: how to replace a file in a .zip fil
OS: AIX5.3
CPU/Ram: 1GB
Model/Manufacturer: IBM
Comment:
i want to replace a file in .zip file in AIX5.3 machine;

say i have file script.ksh file and a build.zip file which contains older version of script.ksh. i dont want to zip the entire thing. i want to replace newer version of script.ksh to build.zip file. please let me know how to do that. its bit urgent.

thanks in advance
Arun S


Report Offensive Message For Removal


Response Number 1
Name: lchi2000g
Date: July 28, 2006 at 06:30:46 Pacific
Subject: how to replace a file in a .zip fil
Reply: (edit)
Example:

/home/oracle/luke/tmp$ ll test.zip
-rw-r--r-- 1 oracle oinstall 2619 Jul 28 08:10 test.zip

/home/oracle/luke/tmp$ unzip -l test.zip
Archive: test.zip
Length Date Time Name
-------- ---- ---- ----
48 07-27-06 12:03 1.sh
487 07-28-06 08:10 2.sh
255 07-27-06 13:55 3.sh
264 07-27-06 12:09 file
405 07-27-06 13:29 file1
90 07-27-06 12:18 file2
18 07-08-06 01:17 in
4139 06-27-06 11:18 rep
-------- -------
5706 8 files

(Then, modifidy 2.sh file)
/home/oracle/luke/tmp$ echo 999 > 2.sh

/home/oracle/luke/tmp$ cat 2.sh
999

(replace the old 2.sh in test.zip with the new 2.sh)
/home/oracle/luke/tmp$ zip -u test.zip 2.sh
updating: 2.sh (stored 0%)

/home/oracle/luke/tmp$ unzip -l test.zip
Archive: test.zip
Length Date Time Name
-------- ---- ---- ----
48 07-27-06 12:03 1.sh
4 07-28-06 08:14 2.sh <== the time changed
255 07-27-06 13:55 3.sh
264 07-27-06 12:09 file
405 07-27-06 13:29 file1
90 07-27-06 12:18 file2
18 07-08-06 01:17 in
4139 06-27-06 11:18 rep
-------- -------
5223 8 files

/home/oracle/luke/tmp$ echo 888 > 2.sh
/home/oracle/luke/tmp$ cat 2.sh
888

(extract 2.sh from test.zip)
/home/oracle/luke/tmp$ unzip test.zip 2.sh
Archive: test.zip
replace 2.sh? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
extracting: 2.sh

(2.sh in test.zip was extracted)
/home/oracle/luke/tmp$ cat 2.sh
999

Luke Chi


Report Offensive Follow Up For Removal




Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: how to replace a file in a .zip fil

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software




Batch File- Current Date in Excel

how to setup call of duty to joytok

WindowsME / HotMail Problem

Corrupt memory

Convert fat32 to Ntfs


The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC