From: Sergey Vlasov <vsu@altlinux.ru>
To: community@lists.altlinux.org
Subject: Re: [Comm] Многотомный tar-архив без split
Date: Fri, 19 Sep 2008 18:14:05 +0400
Message-ID: <20080919141405.GD21125@newmaster.mivlgu.local> (raw)
In-Reply-To: <48D38F40.3080009@rambler.ru>
[-- Attachment #1: Type: text/plain, Size: 977 bytes --]
On Fri, Sep 19, 2008 at 02:38:40PM +0300, Денис Ягофаров wrote:
> Я хочу создать tar'ом многотомный архив....
> но без помощи split... пробую так:
> $ export ARG=1
> $ tar -c -M -L 30000 --new-volume-script="cp test.tar
> test$(ARG=$(($ARG+1)) ; echo $ARG).tar" -f test.tar /folder-test
>
> Но ARG не меняется....
> Когда пробую:
> $ echo $(export ARG=$(($ARG+1)) ; echo $ARG)
> или
> $ echo $( ARG=$(($ARG+1)) ; echo $ARG)
> Результат один и тот же.... Как поменять
> глобальный ARG из "под-"скрипта?
Это невозможно - скрипт выполняется в отдельном экземпляре shell,
который не имеет доступа к переменным других экземпляров.
На самом деле нужно прочитать info '(tar)Multi-Volume Archives' -
там приводится уже почти готовый пример скрипта, создающего
нумерованные файлы (причём имя файла скрипт должен выдавать не в
stdout, а в >&$TAR_FD). Аналогичный скрипт нужно будет использовать
и при распаковке архива, чтобы tar нашёл нужные файлы томов.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2008-09-19 14:14 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 [this message]
2008-09-19 14:52 ` Денис Ягофаров
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=20080919141405.GD21125@newmaster.mivlgu.local \
--to=vsu@altlinux.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