The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    61
    Likes Received:
    0
    Trophy Points:
    6
    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:
    14,447
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
Loading...

Share This Page