ABN 25 173 915 011 markomedia - web development

markomedia - web development

  • Home
  • Contact
  • Blog

zip

  • markomedia
    • Tag zip
Share |
  • December 4, 2010

    Excluding directories from ZIP and TAR archive

    Author
    Marko Tomic

    I’ve been using command line for zipping and ‘tarring’ for a while and never really needed to exclude directories from the archive.

    I had to do this today and I worked out that I had to use absolute paths to achieve this.
    The following examples will exclude multiple directories from tar and zip archives respectively:

    tar -cvf documents.tar.gz /home/user/Documents --exclude "/home/user/Documents/exclude1" --exclude "/home/user/Documents/exclude2"
     
    zip -vr -9 documents.zip /home/user/Documents -x "/home/user/Documents/exclude1" -x "/home/user/Documents/exclude2"

    Marko

    Top

    Navigation

    • Home
    • Contact
    • Blog

    Archives

    • April 2012
    • March 2012
    • February 2012
    • January 2012
    • December 2011
    • November 2011
    • October 2011
    • September 2011
    • August 2011
    • July 2011
    • May 2011
    • December 2010
    • October 2010
    • September 2010
    • August 2010
    • July 2010
    • June 2010
    • May 2010
    • April 2010
    • February 2010
    • January 2010
    • December 2009
    • November 2009
    • October 2009

    From the blog

    • Compile PHP pcntl module on OS X Lion

    • MySQL cursors in stored procedures

    • IE6, IE7, IE8, & IE9 on OS X in Virtual Machine

    • opendiff and FileMerge on OS X

    • Bandwidth throttling on OS X

    About us

    Marko Tomic - Web professional and an Adobe Certified Expert with over 10 years of commercial experience using variety of technologies.

    Connect

    Facebook icon Twitter icon Email icon RSS icon