Sponsored Content
Full Discussion: Zip command not working
Top Forums Shell Programming and Scripting Zip command not working Post 302771187 by onesuri on Wednesday 20th of February 2013 01:28:52 AM
Old 02-20-2013
Zip command not working

Hi,
file.txt
1
2
3
4
5


zip command is not working in linux environment.

Code:
 zip file.zip file.txt

Quote:
The command created file.zip in linux environment. the file moved to windows and unzip in windows and opened the file.
File out put like this.

Output file when we try to open the file in windows
1 2 3 4 5

It is coming as some squre box between the charters and all the data dispalying the same row.

Any option i need choose while i use the zip command in linux environment.

Thanks
onesuri
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

zip command

Hello, What is the appropriate command to zip a folder that contain sub folder and files? Example: Folder lunaa In the folder there are a number of folder e.g 01526, etc...which contains number of file. Any idea would be grateful. Many thanks (1 Reply)
Discussion started by: su_in99
1 Replies

2. Shell Programming and Scripting

zip command

Hi All, I have the following requirement. Source file Products_Extract.dat contains <CTRL M > characters and hence is in DOS format. I zip this file using zip command in UNIX BOX as follows: find . -name Products_Extract.dat|zip Target.zip -@ Next I ftp (in Binary MODE) this output zip... (3 Replies)
Discussion started by: sureshg_sampat
3 Replies

3. 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

4. UNIX for Dummies Questions & Answers

Problem with zip command..

Hi friends I am working in cygwin. Currently I am in root directory(C). I want to zip only the files from a diretory "A" to a new directory 1.zip in root directory C. I am using the following command: $: zip 1.zip A/* but it is zipping the entire directory itself, But what I want is when... (4 Replies)
Discussion started by: ks_reddy
4 Replies

5. Shell Programming and Scripting

Troubles with zip command

Hello, I have some troubles with script that creates a zip archive. First I added following command: zip -r /path/to/folder/packed_file.zip /another/path/folder_for_packing But there is a problem: how to zip the folder without adding full path inside the archive? 'folder_for_backing'... (3 Replies)
Discussion started by: assamalla
3 Replies

6. Shell Programming and Scripting

Command to zip a directory

Hi , How to compress the entire directory . Rajesh (1 Reply)
Discussion started by: guddu_12
1 Replies

7. AIX

ZIP is not working in aix5.3

I am trying zip a file in a aix and getting error below #zip -P welcome test.zip test.csv zip error: Invalid command arguments (encryption not supported) Myos details are 5300-04-03 RPM installed are --- $ rpm -q zip zip-2.3-3 Please help me to resovel this. Please use code... (2 Replies)
Discussion started by: venkataraju
2 Replies

8. UNIX for Dummies Questions & Answers

How to use zip command in AIX?

hi i am not able to use zip command in aix. getting below error zip abc.zip ksh: zip: not found. oslevel 5.3.0.0 (4 Replies)
Discussion started by: scriptor
4 Replies

9. Shell Programming and Scripting

Zip data using Command

HI Guys, I using below command to zip data but in zip file i have entire path of source. zip $HOME/EM/ZIPData/All.tar.gz /vr/rt/on/mg/set/XM/Swor/xt/0300*.* In Zip file i have entire path vr/rt/on/mg/set/XM/Swor/xt/ I just want file data zip in may target location (2 Replies)
Discussion started by: pareshkp
2 Replies

10. Shell Programming and Scripting

Question regarding zip command

Hi, I wish to zip a folder with only those files which have ".properties" extension while excluding all other file extensions be it in the same folder or sub-folder. Can you help me with how can get that to work ? (1 Reply)
Discussion started by: mohtashims
1 Replies
ZIP_FDOPEN(3)						     Library Functions Manual						     ZIP_FDOPEN(3)

NAME
zip_fdopen - open zip archive using open file descriptor LIBRARY
libzip (-lzip) SYNOPSIS
#include <zip.h> struct zip * zip_fdopen(int fd, int flags, int *errorp); DESCRIPTION
The zip archive specified by the open file descriptor fd is opened and a pointer to a struct zip, used to manipulate the archive, is returned. In contrast to zip_open(3), using the archive can only be opened in read-only mode. The fd argument may not be used any longer after calling The are specified by or'ing the following values, or 0 for none of them. ZIP_CHECKCONS Perform additional consistency checks on the archive, and error if they fail. If an error occurs and errorp is it will be set to the corresponding error code. RETURN VALUES
Upon successful completion zip_fdopen returns a struct zip pointer, and fd should not be used any longer, nor passed to close(2). Otherwise, NULL is returned and *errorp is set to indi- cate the error. In the error case, fd remains unchanged. ERRORS
The file specified by fd is prepared for use by libzip(3) unless: [ZIP_ER_INCONS] Inconsistencies were found in the file specified by path and ZIP_CHECKCONS was specified. [ZIP_ER_INVAL] The flags argument is invalid. Not all zip_open(3) flags are allowed for see DESCRIPTION. [ZIP_ER_MEMORY] Required memory could not be allocated. [ZIP_ER_NOZIP] The file specified by fd is not a zip archive. [ZIP_ER_OPEN] The file specified by fd could not be prepared for use by libzip(3). [ZIP_ER_READ] A read error occurred; see for details. [ZIP_ER_SEEK] The file specified by fd does not allow seeks. SEE ALSO
libzip(3), zip_close(3), zip_error_to_str(3), zip_open(3) AUTHORS
Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at> NiH February 1, 2010 ZIP_FDOPEN(3)
All times are GMT -4. The time now is 08:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy