2 # Usage: tarcat volume1 volume2 ...
3 # concatenates a GNU tar multi-volume archive into a single tar archive.
4 # Author: Bruno Haible <bruno@clisp.org>, Sergey Poznyakoff <gray@gnu.org.ua>
6 # Copyright 2004-2005, 2010, 2013-2014, 2016-2017 Free Software
9 # This file is part of GNU tar.
11 # GNU tar is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 3 of the License, or
14 # (at your option) any later version.
16 # GNU tar is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with this program. If not, see <http://www.gnu.org/licenses/>.
25 # Print type character from block N (default 0) of tar archive FILE
27 dd if="$1" skip
=${2:-0} bs
=512 count
=1 2>/dev
/null |
32 case `dump_type "$1"` in
42 if [ -n "$PAX" ]; then
43 if [ "$T" = "g" ]; then
44 # Global extended header.... 2 blocks
45 # Extended header........... 2 blocks
46 # Ustar header.............. 1 block
47 # FIXME: This calculation is will fail for very long file names.
51 if [ "$T" = "V" ]; then
54 if [ "$T" = "M" ]; then