bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] Tarring with --files-from/-T adds files multiple times


From: Sergey Poznyakoff
Subject: Re: [Bug-tar] Tarring with --files-from/-T adds files multiple times
Date: Thu, 30 Jul 2009 10:09:16 +0300

Tyson Tucker <address@hidden> ha escrit:

>    I haven't figured out what makes the duplicate files/directories
>    special, but some are duplicated up to three times in the tar file.Â
>    I've tested it on versions 1.17 and 1.22 on Solaris and 1.22 on Linux.
>    To reproduce:
>    find /usr/local/lib /usr/local/share > test_file

The output from `find' includes both directories and files in them. When
a directory name appears in the file list, tar adds to the archive this
directory and all files (including subdirectories) in it. Therefore,
the resulting archive will contain N copies of each file, where N
is the number of directories in the file's full name.

To fix this, either tighten your find conditions (e.g. -type f), or
give the --no-recursion option to tar. For more info, see

  http://www.gnu.org/software/tar/manual/html_node/recurse.html

Regards,
Sergey




reply via email to

[Prev in Thread] Current Thread [Next in Thread]