Find the answer to your Linux question:
Results 1 to 2 of 2
here's my goal: i would like to zip up everything in my shell, but exclude several directories. let's say i want my file to be called "site.zip", and i want ...
  1. #1
    Just Joined!
    Join Date
    Dec 2007
    Posts
    1

    zip command help

    here's my goal: i would like to zip up everything in my shell, but exclude several directories. let's say i want my file to be called "site.zip", and i want to exclude the directories "bigfiles" and "bigfiles2". i seem to be running into issues no matter how i try this... can anybody help out a n00b?

    thanks!

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    955
    You might try something like find -wholename "./bigfiles" -prune -o -wholename "./bigfiles2" -prune -o -print|gzip - >site.gz.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...