Getting error while trying to unzip the file.


 
Thread Tools Search this Thread
Operating Systems Solaris Getting error while trying to unzip the file.
# 1  
Old 02-09-2018
Getting error while trying to unzip the file.

Hello Team,

I have written below code to zip the directory and all the files and folder under it, but getting an error whenever I am trying to download the file on windows machine and trying to unzip it.

Please help

Code:
catalogName="catalog";
catalogPath="/share/obiee/bidata/service_instances/ssi/metadata/content/"$catalogName;
backupDirectory="/u01/app/obiee/OBIEE_WebCat_Bkp/";
backupDate=$(date +%F);
backupName=$catalogName"_"$backupDate".zip";
cd $backupDirectory;
zip -r $backupName $catalogPath >> CatalogBackup.log;
find /u01/app/obiee/OBIEE_WebCat_Bkp/catalog* -mtime +6 -exec rm {} \;

Thanks a lot for your help


Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 02-09-2018 at 10:06 AM.. Reason: Added CODE tags.
# 2  
Old 02-09-2018
Getting what error?
This User Gave Thanks to Corona688 For This Post:
# 3  
Old 02-14-2018
Hello Team,

whenever I am trying to download the file on my windows system via ftp and trying to unzip it, its getting error out saying file has been corrupted.

Can you please let me know if there is any other simple way to take daily backup of above folder.

Thanks & Regards,
Abhishek
# 4  
Old 02-14-2018
Are you doing the FTP transfer in 'binary' mode? If not, that will be the problem.
# 5  
Old 02-14-2018
Does it unzip correctly on your original host? Did you consider trying several different unzippers on the windows side? Would it make sense to run unix2dos (or equivalent) before zipping it?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unzip a gz file

Please tell me the unix command how to unzip a gz file(say a qwe.gz) and the orginal gz file should remain intact. Thanks in advance (7 Replies)
Discussion started by: pranabpal
7 Replies

2. Shell Programming and Scripting

Unzip the .zip file without using unzip utility in UNIX

I have .zip file, i want to list all the files archived in the zip file. unzip utility is not working for me in unix. Please help me resolve this issue Thanks ganesh. (3 Replies)
Discussion started by: Ganesh L
3 Replies

3. UNIX for Dummies Questions & Answers

Unzip a .rar file

Hi, How to unzip a .rar file in unix. I tried unrar command but it doesnt work. Any help will be appreciated Thanks (10 Replies)
Discussion started by: irudayaraj
10 Replies

4. UNIX for Dummies Questions & Answers

unzip failing with write error

All, I am trying to unzip a file, when i doing i am seeing the below error. I have more than enough memory space in the directory where i am unziping. Can you please help me to find out the issue I dont know why i am getting disk full error. I have more space in /pa01 directory ... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies

5. UNIX for Dummies Questions & Answers

unzip single file in zip file to STDOUT

Hi, Does anyone know if there is an unzip command similar to tar -xOf $tarBall $fileInTarFile which will untar a single file in a tar ball to STDOUT ? I want to do the same but with a .zip (ZIP archive) file. - Andy ---------- Post updated at 05:56 PM ---------- Previous update... (0 Replies)
Discussion started by: andyatit
0 Replies

6. Shell Programming and Scripting

How to Unzip a file using unzip utility for files zipped without zip utility ?

Hi, I need to zip/compress a data file and send to a vendor. The vendor does have only unzip utility and can accept only .ZIP files. I do not have zip utility in my server. How do I zip/compress the file so that it can be deflated using unzip command ? I tried gzip & compress commands, but... (1 Reply)
Discussion started by: Sabari Nath S
1 Replies

7. Shell Programming and Scripting

How to unzip the file

Hi, I have a file in the form of .zip in unix directory, now I want to unzip the file in unix environment. May I know how to unzip this file File name: cust.zip Thanks in Advance... Aswice (1 Reply)
Discussion started by: aswice
1 Replies

8. Shell Programming and Scripting

How to Unzip a .ZIP file in Unix without using unzip cmd..?????

Hi All I have ftped a .ZIP file (zipped using WinZip in Windows) to my Unix server (HP-UX). I don't have unzip cmd available in my curent Unix version Please let me know any cmd in UNIX (other than unzip) using which I can unzip this .ZIP file . Please elaborate on the commands aval and... (5 Replies)
Discussion started by: sureshg_sampat
5 Replies

9. Shell Programming and Scripting

Suppress error message in unzip

I'm creating a bsh shell to unzip a file from one directory into another. The directory that holds the zip files has zip files constantly being added to it, so I am testing it before it does the unzip and more. Right now my code looks like this: unzip -tq $ZIP_PATH/$ZIP_NAME >/dev/null if ... (5 Replies)
Discussion started by: skwyer
5 Replies

10. HP-UX

How to Unzip a .ZIP file in Unix without using unzip cmd..?????

Hi All I have ftped a .ZIP file (zipped using WinZip in Windows) to my Unix server (HP-UX). I don't have unzip cmd available in my curent Unix version Please let me know any cmd in UNIX (other than unzip) using which I can unzip this .ZIP file . Please elaborate on the commands aval and... (5 Replies)
Discussion started by: sureshg_sampat
5 Replies
Login or Register to Ask a Question