ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Денис Ягофаров" <denyago@rambler.ru>
To: ALT Linux Community general discussions <community@lists.altlinux.org>
Subject: Re: [Comm] Многотомный tar-архив без split
Date: Fri, 19 Sep 2008 17:52:04 +0300
Message-ID: <48D3BC94.6070300@rambler.ru> (raw)
In-Reply-To: <20080919141405.GD21125@newmaster.mivlgu.local>

[-- Attachment #1: Type: text/plain, Size: 1188 bytes --]

Sergey Vlasov пишет:
> На самом деле нужно прочитать info '(tar)Multi-Volume Archives' -
> там приводится уже почти готовый пример скрипта, создающего
> нумерованные файлы (причём имя файла скрипт должен выдавать не в
> stdout, а в >&$TAR_FD).  Аналогичный скрипт нужно будет использовать
> и при распаковке архива, чтобы tar нашёл нужные файлы томов.
>   
Нашел... вот что получилось:

$ tar --version
tar (GNU tar) 1.15.1

$cat ~/new-volume
#! /bin/sh
echo Preparing volume $TAR_VOLUME of $TAR_ARCHIVE.
name=`expr $TAR_ARCHIVE : '\(.*\)-.*'`
case $TAR_SUBCOMMAND in
-c)       ;;
-d|-x|-t) test -r ${name:-$TAR_ARCHIVE}-$TAR_VOLUME || exit 1
          ;;
*)        exit 1
esac
echo ${name:-$TAR_ARCHIVE}-$TAR_VOLUME >&$TAR_FD

$ tar -c -M -L1024 -f archive.tar -F ~/new-volume /var/cache/apt
tar: Removing leading `/' from member names
Preparing volume of .
expr: syntax error
tar: `/root/new-volume' command failed
tar: Error is not recoverable: exiting now

Попробовал просто:
$ tar -c -M -L1024 -f archive.tar -F "echo $TAR_VOLUME" /var/cache/apt
tar: Removing leading `/' from member names
*Получил просто пустые строки, видимо отработал echo*

Выходит, переменные не передаются =(.

[-- Attachment #2: denyago.vcf --]
[-- Type: text/x-vcard, Size: 269 bytes --]

begin:vcard
fn:Denis Timurovich Yagofarov
n:Yagofarov;Denis Timurovich
org:ITGIS NASU
adr:room 615;;Chokolovski blvdr., 13;Kiev;;03151;Ukraine
email;internet:denyago@rambler.ru
title:system administrator
tel;work:80442480755
x-mozilla-html:FALSE
version:2.1
end:vcard


      reply	other threads:[~2008-09-19 14:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-19 11:38 Денис Ягофаров
2008-09-19 12:17 ` Kirill A. Shutemov
2008-09-19 12:29   ` Денис Ягофаров
2008-09-19 15:37     ` Alexey I. Froloff
2008-09-19 14:14 ` Sergey Vlasov
2008-09-19 14:52   ` Денис Ягофаров [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48D3BC94.6070300@rambler.ru \
    --to=denyago@rambler.ru \
    --cc=community@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git