ZIP Problem


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ZIP Problem
# 1  
Old 11-17-2008
Java ZIP Problem

Hi Folks,

i have a script to zip certain files. redirecting the successfully zipped files and unsuccessful files to seperate files.

i found unzipped file name in zipped file list.
i dont know why it happened.
and, some of the files are not zipped.

i checked the previllege also, even without execution permission it is possible to zip, but some files are missing to process. i need your suggestions here. and need some more clarifications...

here are my concerns?
1> if the file was created by some other user, i am trying to zip that when the user is currently working(opened) in that file. will zip work in this case?
2> is there any difference in gzip and compress command?
3> is possible to protect the file from any other operations by any other users. if this possible what is the way to zip that file.

its very severe issue could you please guide me in a way to catch the exact point.

Thanks.
# 2  
Old 11-17-2008
Question

Can you show us a listing of the files you are trying to work with; do an ls -l command so the file priviliges are visble.
Then, let's see the command you are using.
Finally, show us the archive/listing of what is in the zip folder.

Any number of things could be wrong from you not having access to some of the files you are trying to zip to you not having access to create the zip file.
# 3  
Old 11-17-2008
yeah i agree.

here is the sample previlege list
-rw-r--r-- sometimes
-rw-r----- sometimes

zip worked for the files which have the above privilege sometimes it fails to zip.
the zipped files are stored in a file as a list with directory (complete path).
i dont know the command we are using to zip but looking into the file extension after zip in the particular folder i am seeing .gz, so i think we are using gzip command.

actually i just want to help some other team. so i cannot able to give you all info.
the info what i provided above is what i got from my friend.

could you please guide me to help in solving the issue.


thanks for your response Joeyg.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

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

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

3. Shell Programming and Scripting

Problem running zip from cron - bad zipfile offset

I've created a pretty straightforward shell script to do backups via rsync. Every night it rsyncs a copy of a website (approx 60GB) to the local machine. Once a week, after the rsync step, it zips the local copy of the whole site into 2GB chunks and places them in another folder. When running... (3 Replies)
Discussion started by: Agreppa
3 Replies

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

5. Shell Programming and Scripting

Grep on zip file problem

Hi All, I'm stuck with this issue when I try to display the searched string into a compressed file. More exactly when I run this script for f1 in $(find dir1 -type f -print); do gunzip -c $f1 | grep -n "gio" | awk -F":" '{print $1-1 "," $1 "p"}' | xargs -i sed -n {} $f1 ; done returns... (3 Replies)
Discussion started by: gio1234
3 Replies

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

7. Shell Programming and Scripting

Problem in piping the file(s) content from zip files

Hi friends I have a zip file 1.zip which contains three text files a.txt b.txt c.txt I want to grep some text(keyword) in those 3 files without extracting all the three files to a local directoryusing the command, unzip -p 1.zip |grep "search text" >result.txt The Output file is... (2 Replies)
Discussion started by: ks_reddy
2 Replies

8. Shell Programming and Scripting

zip code filter problem using AWK need help

Hello all; I have a large file (csv file) with addresses. I am trying to filter out specific entries based on zip code from a particular column of data. However my awk statement can not account for zipcode that begins with a certain pattern. It finds the pattern anywhere within the zipcode. ... (3 Replies)
Discussion started by: nelsonsierra
3 Replies

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

10. Solaris

strange problem regarding zip/unzip from window to solaris machine

Hi , I faced a very strange problem when I unzip a zip file on my solaris workstation. Actually I wanted to transfer a folder, say it TEST which contains some sub-folders inside it from windows to solaris machine. So I zipped this folder to TEST.ZIP on my windows machine. Then from my... (11 Replies)
Discussion started by: Raj Kumar Arora
11 Replies
Login or Register to Ask a Question