LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-10-2009, 06:28 AM   #1
XeroXer
LQ Newbie
 
Registered: Jun 2008
Location: Västerås, Sweden
Distribution: Arch Linux, Debian, Ubuntu
Posts: 21

Rep: Reputation: 16
Question 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...
 
Old 01-10-2009, 06:44 AM   #2
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,040

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
What's the command you are using?

Did you try -x *.svn/*?
 
Old 01-10-2009, 06:48 AM   #3
XeroXer
LQ Newbie
 
Registered: Jun 2008
Location: Västerås, Sweden
Distribution: Arch Linux, Debian, Ubuntu
Posts: 21

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by i92guboj View Post
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...
 
Old 01-10-2009, 07:10 AM   #4
XeroXer
LQ Newbie
 
Registered: Jun 2008
Location: Västerås, Sweden
Distribution: Arch Linux, Debian, Ubuntu
Posts: 21

Original Poster
Rep: Reputation: 16
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 :/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
yum command to exclude some updates? gimmee Fedora 8 03-16-2014 03:15 AM
Exclude function On rsync command its_joy Linux - Server 5 01-18-2008 04:25 AM
Unzip command ZT13 Linux - Software 1 12-24-2006 01:10 AM
unzip command options jaa1180 Linux - Software 4 11-04-2003 11:10 AM


All times are GMT -5. The time now is 02:19 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration