Joseph Bloggs

Online home of Joseph Talbot: Little Briton

Main menu

Excluding hidden svn metadata files when zipping up a directory

19 April 2013 - 9:50am -- Joseph

Ever wondered how to exclude .svn files from a directory you want to zip? My colleague just showed me this command (thanks James!), which I record here for future reference:

zip myzipfile.zip -r mydirectory/ -x \*.svn\*

Yes, I know I could export from the repository:

svn export directory ~/svn-exports/new-directory

but it's useful to know another method.

Please note: the zip command is a Unix command so won't work on Windows, sorry... (Works on Mac though)

 

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.