Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#425 tar --exclude=somedir/somefile won't work

Tar
open
GnuWin
Binaries (396)
5
2012-07-26
2008-04-13
bughunter2
No

In Windows, tar cf my_tar.tar somedir --exclude=somedir/somefile won't work.

tar cvf my_tar.tar somedir --exclude=somedir/somefile outputs:

somedir/
somedir/somefile

But it should output:

somedir/

Discussion

  • GnuWin
    GnuWin
    2008-04-14

    Logged In: YES
    user_id=217802
    Originator: NO

    As a work-around, you might use bsdtar from the libarchive package (http://gnuwin32.sourceforge.net/packages/libarchive.htm), with the −-exclude option.

     
  • bughunter2
    bughunter2
    2008-04-14

    Logged In: YES
    user_id=1494267
    Originator: YES

    Thanks.

    I already worked around the bug by using Cygwin (I had it installed anyway) until the bug is fixed.

     
  • bughunter2
    bughunter2
    2008-09-28

    Unfortunately, I have to report that bsdtar doesn't work either with `--exclude=somedir/somefile'.

     


Anonymous


Cancel   Add attachments