Sponsored Content
Full Discussion: Zip -r Functionality
Top Forums UNIX for Dummies Questions & Answers Zip -r Functionality Post 302869447 by smile689 on Wednesday 30th of October 2013 10:57:33 AM
Old 10-30-2013
Zip -r Functionality

Hi ,

I've written the following code to zip the big file

Code:
$dir_temp ="/home/etc/hst
zip -r $dir_temp/file_nm.zip $dir_temp/file_nm

The zip file has been created . When I try to UNZIP the file
with the following command
Code:
unzip file_nm.zip

The file got unzipped but created in the following path /home/etc/hst/home/etc/hst/file_nm

Please suggest me the correct unzip command so that the file got unzipped in the /home/etc/hst folder .

Thanks

Last edited by smile689; 10-30-2013 at 11:58 AM.. Reason: correcting the typo mistake
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sed functionality

I have a few xml files and I want to input say 5 parameters within each file. is it possible to do so with sed? <parameter>A</parameter> <parameter>B</parameter> .... .... And so on. These parameters are meant to go in just inside: <?xml... (2 Replies)
Discussion started by: collern2
2 Replies

2. Shell Programming and Scripting

Restartibility Functionality....

Hello, I am trying to write a script that has a option of restarting the script from where it failed. I have to write a script called Batch.sh. This script has to run quite a few sql files as shown below: logcmd.sh -f test1.sql logcmd.sh -f test2.sql logcmd.sh -f test3.sql logcmd.sh -f... (4 Replies)
Discussion started by: rkumar28
4 Replies

3. UNIX for Dummies Questions & Answers

unzip .zip file and list the files included in the .zip archive

Hello, I am trying to return the name of the resulting file from a .zip archive file using unix unzip command. unzip c07212007.cef7081.zip Archive: c07212007.cef7081.zip SecureZIP for z/OS by PKWARE inflating: CEP/CEM7080/PPVBILL/PASS/G0063V00 I used the following command to unzip in... (5 Replies)
Discussion started by: oracledev
5 Replies

4. UNIX for Dummies Questions & Answers

Zip command (zip folder doesn't include a folder of the same name)

Hi guys, I have a question about the zip command. Right now I have a directory with some files and folders on it that I want to compress. When I run the zip command: zip foo -r I am getting a foo.zip file that once I unzip it contains a foo folder. I want to create the foo.zip, but that... (1 Reply)
Discussion started by: elioncho
1 Replies

5. AIX

ZIP multiple files and also specify size of zip file

I have to zip many pdf files and the size of zip file must not exceed 200 MB. When size is more than 200 MB then multiple zip files needs to be created. How we can achieve this in UNIX? I have tried ZIP utility but it takes a lot of time when we add individual pdfs by looping through a... (1 Reply)
Discussion started by: tom007
1 Replies

6. UNIX for Dummies Questions & Answers

Zip a file with .zip extension.

Hi, I need to zip a .dat file with .zip extension. I tried using the "zip" command. But shell says. "ksh: zip: not found" Currently I am using gunzip to zip and changing the extension ".gz" to ".zip" as follows. mv $file `echo $file | sed 's/\(.*\.\)gz/\1zip/'` But when I tried... (1 Reply)
Discussion started by: aeroticman
1 Replies

7. Shell Programming and Scripting

Pipe Functionality

Hi, I am trying to emulate the '|' functionality through pipe function call. I am passing the o/p of exec in parent as input to the exec in child. The buf is readin the o/p but the exec in child is not working. Can somebody checkout the code and point where am i going wrong or missing something.... (3 Replies)
Discussion started by: amejoish
3 Replies

8. Shell Programming and Scripting

Zip Multiple files to One .zip file in AIX system

Hi I have a requirement in unix shell where I need to zip multiple files on server to one single .zip file. I dont see zip command in AIX and gzip command not doing completely what I want. One I do .zip file, I should be able to unzip in my local Computer. Here is example what I want... (9 Replies)
Discussion started by: RAMA PULI
9 Replies

9. UNIX for Beginners Questions & Answers

How can we Zip multiple files created on the same date into one single zip file.?

Hi all i am very new to shell scripting and need some help from you to learn 1)i have some log files that gets generated on daily basis example: i have abc_2017_01_30_1.log ,2017_01_30_2.log like wise so i want to zip this 4 logs which are created on same date into one zip folder. 2)Post zipping... (2 Replies)
Discussion started by: b.saipriyanka
2 Replies

10. Shell Programming and Scripting

How can we Zip multiple files created on the same date into one single zip file.?

Hi all i am very new to shell scripting and need some help from you to learn 1)i have some log files that gets generated on daily basis example: i have abc_2017_01_30_1.log ,2017_01_30_2.log like wise so i want to zip this 4 logs which are created on same date into one zip folder. 2)Post zipping... (1 Reply)
Discussion started by: b.saipriyanka
1 Replies
ZIPDETAILS(1p)						User Contributed Perl Documentation					    ZIPDETAILS(1p)

NAME
zipdetails - display the internal structure of zip files SYNOPSIS
zipdetaile [-v] zipfile.zip zipdetails -h DESCRIPTION
Zipdetails displays information about the internal record structure of the zip file. It is not concerned with displaying any details of the compressed data stored in the zip file. The program assumes prior understanding of the internal structure of a Zip file. You should have a copy of the Zip APPNOTE file at hand to help understand the output from this program ("SEE ALSO" for details). OPTIONS -v Enable Verbose mode -h Display help By default zipdetails will output the details of the zip file in three columns. Column 1 This contains the offset from the start of the file in hex. Column 2 This contains a textual description of the field. Column 3 If the field contains a numeric value it will be displayed in hex. Zip stored most numbers in little-endian format - the value displayed will have the little-endian encoding removed. Next, is an optional description of what the value means. If the "-v" option is present, column 1 is expanded to include o The offset from the start of the file in hex. o The length of the filed in hex. o A hex dump of the bytes in field in the order they are stored in the zip file. TODO
Error handling is still a work in progress. If the program encounters a problem reading a zip file it is likely to terminate with an unhelpful error message. SEE ALSO
The primary reference for Zip files is the "appnote" document available at <http://www.pkware.com/documents/casestudies/APPNOTE.TXT>. An alternative is the Info-Zip appnote. This is available from ftp://ftp.info-zip.org/pub/infozip/doc/ <ftp://ftp.info- zip.org/pub/infozip/doc/> The "zipinfo" program that comes with the info-zip distribution (http://www.info-zip.org/ <http://www.info-zip.org/>) can also display details of the structure of a zip file. See also IO::Compress::Zip, IO::Uncompress::Unzip. AUTHOR
Paul Marquess pmqs@cpan.org. COPYRIGHT
Copyright (c) 2011-2012 Paul Marquess. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-01-01 ZIPDETAILS(1p)
All times are GMT -4. The time now is 03:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy