tar and extended attributes

Discussion in 'OS X Mavericks (10.9)' started by funkytwig, Jan 17, 2015.

  1. funkytwig macrumors member

    Joined:
    Jan 14, 2011
    #1
    I read it was possible now to include extended attributes in tar archives and that you needed to add a flag to the tar command but it did not say what the fag was. Anyone know what flage I need?
     
  2. alex0002, Jan 19, 2015
    Last edited: Jan 19, 2015

    alex0002 macrumors 6502

    Joined:
    Jun 19, 2013
    Location:
    New Zealand
    #2
    To the best of my knowledge, this feature of including the extended attributes is default behaviour in os x tar.

    Just create the tar archive with 'normal' options.

    Code:
    tar cvf test.tar file1 file2
    Then copy the tar archive to another folder or another Mac and extract the files.

    Code:
    tar xvf test.tar
    The extended attributes should be preserved.

    More info:
    http://en.wikipedia.org/wiki/AppleSingle_and_AppleDouble_formats
    http://apple.stackexchange.com/ques...osx-add-extra-filename-when-i-tar-a-directory
     

Share This Page