Results 1 to 2 of 2

Thread: tar --exclude doesn't work with absolute paths

  1. #1
    Administrator Kavoir's Avatar
    Join Date
    Dec 2009
    Posts
    183

    Arrow tar --exclude doesn't work with absolute paths

    The other day I was backing something up. It's a directory and I didn't want a specific sub-directory within to be included in the archive, so I tried to exclude it with the --exclude option of the tar command.

    It first didn't work because I used an absolute path like --exclude "/home/myuser/example.com/tobeexcluded", tar just ignored my choice and went on archiving that particular sub-directory.

    However after I changed that path to a relative one like --exclude example.com/tobeexcluded, it worked.

    It's really weird. I don't know why but I think I'll keep this in mind next time I want to exclude something when tarring.



    Perhaps it's because of the extra double quotes? That's the only other difference.

  2. #2
    Administrator Kavoir's Avatar
    Join Date
    Dec 2009
    Posts
    183
    I still have no idea why this happens.

Posting Permissions

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