Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Exclude dir on tar files

Discussion in 'General Discussion' started by cesarlwh, Mar 16, 2009.

  1. cesarlwh

    cesarlwh Well-Known Member

    Joined:
    Sep 23, 2008
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    56
    Hi, how to exclude one dir on tar files?

    example:

    List off the files and dirs to tar:

    test/
    config/
    temp/
    picture.jpg
    doc.txt

    I need to tar all files, but not the dir test/ how to i make this with the tar command?

    I testing with the option --exclude=test but on this mode, all files and dirs named test are excluded from tar... and i need to exclude only exact path(/backups)
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,309
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice