LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Exclude file pattern from unzip command (http://www.linuxquestions.org/questions/linux-newbie-8/exclude-file-pattern-from-unzip-command-696287/)

XeroXer 01-10-2009 06:28 AM

Exclude file pattern from unzip command
 
Hi all...

I have a small problem caused by people creating zip files with .svn directories in them.
I have a small script that downloads a few files and unzips them into one of my svn dirs.
This is done once every day so I made a small bash script that handles this and added it to crontab.

The problem is that one of the zip files that the script downloads contains a .svn dir, this is a problem when it is unzipped into my svn dir.

I have tried using the unzip -x to exclude the .svn dir but I can't get the exclude to work at all.
Maybe someone can tell me how to unzip a file and exclude all dirs named .svn...

Thanks in advance...

i92guboj 01-10-2009 06:44 AM

What's the command you are using?

Did you try -x *.svn/*?

XeroXer 01-10-2009 06:48 AM

Quote:

Originally Posted by i92guboj (Post 3403423)
What's the command you are using?

Did you try -x *.svn/*?

I thought I did but apparently not, because that worked.
Thanks a lot...

XeroXer 01-10-2009 07:10 AM

Sry to get back on this but I found what caused the error.

The command:
unzip file.zip -x *.svn/*
workes perfect on my ubuntu machine, and thats where I tested the last part.
But it does not work on my debian server :/


All times are GMT -5. The time now is 06:37 AM.