<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Linux Forum &mdash; Разбивка папки на части]]></title>
	<link rel="self" href="https://linuxforum.ru/extern.php?action=feed&amp;tid=19159&amp;type=atom" />
	<updated>2011-12-28T17:33:36Z</updated>
	<generator>PunBB</generator>
	<id>https://linuxforum.ru/viewtopic.php?id=19159</id>
		<entry>
			<title type="html"><![CDATA[Re: Разбивка папки на части]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=238225#p238225" />
			<content type="html"><![CDATA[<p>Ставим p7zip и выполняем команду<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">7z a -tzip -mx=9 -v4g /path/to/archive.zip /path/to/directory/*</div><br />Создадутся архивы zip (с разбиением по 4Гб), которые откроются и в WinRAR и в 7-zip. Архив же одним файлом откроется даже в проводнике Windows.</p>]]></content>
			<author>
				<name><![CDATA[AmiD_FLice]]></name>
				<uri>https://linuxforum.ru/profile.php?id=11978</uri>
			</author>
			<updated>2011-12-28T17:33:36Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=238225#p238225</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Разбивка папки на части]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=238186#p238186" />
			<content type="html"><![CDATA[<p>а переименовка файлов не всегда приемлема... (это про ваши советы)<br />представьте как вы будете потом в винде переименовывать взад все... а надо сохранить оригинальные имена...</p>]]></content>
			<author>
				<name><![CDATA[Харитон]]></name>
				<uri>https://linuxforum.ru/profile.php?id=627</uri>
			</author>
			<updated>2011-12-28T13:34:09Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=238186#p238186</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Разбивка папки на части]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=238184#p238184" />
			<content type="html"><![CDATA[<p>можно исправить... это да...<br />только патч для конкретной версии и несоответствие с дистром не есть карашо...<br />лучше уж тар(не знаю как его распакуют под виндой - ни разу не пробовал. винрар кажисть тар понимает).<br />а 7-зип кажисть с русскими буквами работает...</p>]]></content>
			<author>
				<name><![CDATA[Харитон]]></name>
				<uri>https://linuxforum.ru/profile.php?id=627</uri>
			</author>
			<updated>2011-12-28T13:32:24Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=238184#p238184</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Разбивка папки на части]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=238175#p238175" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Харитон пишет:</cite><blockquote><p>но если в именах файлов кириллица будет - отгребете геморрой...</p></blockquote></div><p>можно и исправить. читайте <a href="http://drbatty.ru/sed">здесь</a> (лень точную ссылку искать, там есть, в главе третей вроде)</p>]]></content>
			<author>
				<name><![CDATA[drBatty]]></name>
				<uri>https://linuxforum.ru/profile.php?id=86</uri>
			</author>
			<updated>2011-12-28T12:26:17Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=238175#p238175</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Разбивка папки на части]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=238170#p238170" />
			<content type="html"><![CDATA[<p>Если надо нативная поддержка винды, то:<br />man zip</p><p>но если в именах файлов кириллица будет - отгребете геморрой...</p>]]></content>
			<author>
				<name><![CDATA[Харитон]]></name>
				<uri>https://linuxforum.ru/profile.php?id=627</uri>
			</author>
			<updated>2011-12-28T11:59:48Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=238170#p238170</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Разбивка папки на части]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=238138#p238138" />
			<content type="html"><![CDATA[<p>можно ещё и таким образом:<br />(кому что непонятно - спрашивайте)</p><br /><div class="codebox"><pre><code>File: tar.info,  Node: Multi-Volume Archives,  Next: Tape Files,  Up: Using Multiple Tapes

9.6.1 Archives Longer than One Tape or Disk
-------------------------------------------

To create an archive that is larger than will fit on a single unit of
the media, use the `--multi-volume&#039; (`-M&#039;) option in conjunction with
the `--create&#039; option (*note create::).  A &quot;multi-volume&quot; archive can
be manipulated like any other archive (provided the `--multi-volume&#039;
option is specified), but is stored on more than one tape or file.

   When you specify `--multi-volume&#039;, `tar&#039; does not report an error
when it comes to the end of an archive volume (when reading), or the
end of the media (when writing).  Instead, it prompts you to load a new
storage volume.  If the archive is on a magnetic tape, you should
change tapes when you see the prompt; if the archive is on a floppy
disk, you should change disks; etc.

`--multi-volume&#039;
`-M&#039;
     Creates a multi-volume archive, when used in conjunction with
     `--create&#039; (`-c&#039;).  To perform any other operation on a
     multi-volume archive, specify `--multi-volume&#039; in conjunction with
     that operation.  For example:

          $ tar --create --multi-volume --file=/dev/tape FILES

   The method `tar&#039; uses to detect end of tape is not perfect, and
fails on some operating systems or on some devices.  If `tar&#039; cannot
detect the end of the tape itself, you can use `--tape-length&#039; option
to inform it about the capacity of the tape:

`--tape-length=SIZE[SUF]&#039;
`-L SIZE[SUF]&#039;
     Set maximum length of a volume.  The SUF, if given, specifies
     units in which SIZE is expressed, e.g. `2M&#039; mean 2 megabytes
     (*note Table 9.1: size-suffixes, for a list of allowed size
     suffixes).  Without SUF, units of 1024 bytes (kilobyte) are
     assumed.

     This option selects `--multi-volume&#039; automatically.  For example:

          $ tar --create --tape-length=41943040 --file=/dev/tape FILES

     or, which is equivalent:

          $ tar --create --tape-length=4G --file=/dev/tape FILES

   When GNU `tar&#039; comes to the end of a storage media, it asks you to
change the volume.  The built-in prompt for POSIX locale is(1):

     Prepare volume #N for `ARCHIVE&#039; and hit return:

where N is the ordinal number of the volume to be created and ARCHIVE
is archive file or device name.

   When prompting for a new tape, `tar&#039; accepts any of the following
responses:
   When prompting for a new tape, `tar&#039; accepts any of the following
responses:

`?&#039;
     Request `tar&#039; to explain possible responses.

`q&#039;
     Request `tar&#039; to exit immediately.

`n FILE-NAME&#039;
     Request `tar&#039; to write the next volume on the file FILE-NAME.

`!&#039;
     Request `tar&#039; to run a subshell.  This option can be disabled by
     giving `--restrict&#039; command line option to `tar&#039;(2).

`y&#039;
     Request `tar&#039; to begin writing the next volume.

   (You should only type `y&#039; after you have changed the tape; otherwise
`tar&#039; will write over the volume it just finished.)

   The volume number used by `tar&#039; in its tape-changing prompt can be
changed; if you give the `--volno-file=FILE-OF-NUMBER&#039; option, then
FILE-OF-NUMBER should be an non-existing file to be created, or else, a
file already containing a decimal number.  That number will be used as
the volume number of the first volume written.  When `tar&#039; is finished,
it will rewrite the file with the now-current volume number. (This does
not change the volume number written on a tape label, as per *note
label::, it _only_ affects the number used in the prompt.)

   If you want more elaborate behavior than this, you can write a
special &quot;new volume script&quot;, that will be responsible for changing the
volume, and instruct `tar&#039; to use it instead of its normal prompting
procedure:

`--info-script=SCRIPT-NAME&#039;
`--new-volume-script=SCRIPT-NAME&#039;
`-F SCRIPT-NAME&#039;
     Specify the full name of the volume script to use.  The script can
     be used to eject cassettes, or to broadcast messages such as
     `Someone please come change my tape&#039; when performing unattended
     backups.

   The SCRIPT-NAME is executed without any command line arguments.  It
inherits `tar&#039;&#039;s shell environment.  Additional data is passed to it
via the following environment variables:

`TAR_VERSION&#039;
     GNU `tar&#039; version number.

`TAR_ARCHIVE&#039;
     The name of the archive `tar&#039; is processing.

`TAR_BLOCKING_FACTOR&#039;
     Current blocking factor (*note Blocking::).

`TAR_VOLUME&#039;
`TAR_VOLUME&#039;
     Ordinal number of the volume `tar&#039; is about to start.

`TAR_SUBCOMMAND&#039;
     A short option describing the operation `tar&#039; is executing.  *Note
     Operations::, for a complete list of subcommand options.

`TAR_FORMAT&#039;
     Format of the archive being processed. *Note Formats::, for a
     complete list of archive format names.

`TAR_FD&#039;
     File descriptor which can be used to communicate the new volume
     name to `tar&#039;.

   The volume script can instruct `tar&#039; to use new archive name, by
writing in to file descriptor `$TAR_FD&#039; (see below for an example).

   If the info script fails, `tar&#039; exits; otherwise, it begins writing
the next volume.

   If you want `tar&#039; to cycle through a series of files or tape drives,
there are three approaches to choose from.  First of all, you can give
`tar&#039; multiple `--file&#039; options.  In this case the specified files will
be used, in sequence, as the successive volumes of the archive.  Only
when the first one in the sequence needs to be used again will `tar&#039;
prompt for a tape change (or run the info script).  For example,
suppose someone has two tape drives on a system named `/dev/tape0&#039; and
`/dev/tape1&#039;.  For having GNU `tar&#039; to switch to the second drive when
it needs to write the second tape, and then back to the first tape,
etc., just do either of:

     $ tar --create --multi-volume --file=/dev/tape0 --file=/dev/tape1 FILES
     $ tar cMff /dev/tape0 /dev/tape1 FILES

   The second method is to use the `n&#039; response to the tape-change
prompt.

   Finally, the most flexible approach is to use a volume script, that
writes new archive name to the file descriptor `$TAR_FD&#039;.  For example,
the following volume script will create a series of archive files, named
`ARCHIVE-VOL&#039;, where ARCHIVE is the name of the archive being created
(as given by `--file&#039; option) and VOL is the ordinal number of the
archive being created:

     #! /bin/sh
     echo Preparing volume $TAR_VOLUME of $TAR_ARCHIVE.

     name=`expr $TAR_ARCHIVE : &#039;\(.*\)-.*&#039;`
     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 &gt;&amp;$TAR_FD
     echo ${name:-$TAR_ARCHIVE}-$TAR_VOLUME &gt;&amp;$TAR_FD

   The same script can be used while listing, comparing or extracting
from the created archive.  For example:

     # Create a multi-volume archive:
     $ tar -c -L1024 -f archive.tar -F new-volume .
     # Extract from the created archive:
     $ tar -x -f archive.tar -F new-volume .

Notice, that the first command had to use `-L&#039; option, since otherwise
GNU `tar&#039; will end up writing everything to file `archive.tar&#039;.

   You can read each individual volume of a multi-volume archive as if
it were an archive by itself.  For example, to list the contents of one
volume, use `--list&#039;, without `--multi-volume&#039; specified.  To extract
an archive member from one volume (assuming it is described that
volume), use `--extract&#039;, again without `--multi-volume&#039;.

   If an archive member is split across volumes (i.e., its entry begins
on one volume of the media and ends on another), you need to specify
`--multi-volume&#039; to extract it successfully.  In this case, you should
load the volume where the archive member starts, and use `tar --extract
--multi-volume&#039;--`tar&#039; will prompt for later volumes as it needs them.
*Note extracting archives::, for more information about extracting
archives.

   Multi-volume archives can be modified like any other archive.  To add
files to a multi-volume archive, you need to only mount the last volume
of the archive media (and new volumes, if needed).  For all other
operations, you need to use the entire archive.

   If a multi-volume archive was labeled using `--label=ARCHIVE-LABEL&#039;
(*note label::) when it was created, `tar&#039; will not automatically label
volumes which are added later.  To label subsequent volumes, specify
`--label=ARCHIVE-LABEL&#039; again in conjunction with the `--append&#039;,
`--update&#039; or `--concatenate&#039; operation.

   Notice that multi-volume support is a GNU extension and the archives
created in this mode should be read only using GNU `tar&#039;.  If you
absolutely have to process such archives using a third-party `tar&#039;
implementation, read *note Split Recovery::.

   ---------- Footnotes ----------

   (1) If you run GNU `tar&#039; under a different locale, the translation
to the locale&#039;s language will be used.

   (2) *Note --restrict::, for more information about this option.</code></pre></div>]]></content>
			<author>
				<name><![CDATA[drBatty]]></name>
				<uri>https://linuxforum.ru/profile.php?id=86</uri>
			</author>
			<updated>2011-12-28T10:48:46Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=238138#p238138</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Разбивка папки на части]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=238137#p238137" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>portos пишет:</cite><blockquote><p>Подскажите как правильно сжать папку 22Гб в архивы по 4ГБ (чтобы умещались на болванку) и с возможностью распаковки в Windows.</p></blockquote></div><p>1. сжать<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">tar -cJvvf ~/archive.txz source</div><br />2. порезать на куски по 4Гб<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">split -b4G ~/archive.txz<br /></div></p>]]></content>
			<author>
				<name><![CDATA[drBatty]]></name>
				<uri>https://linuxforum.ru/profile.php?id=86</uri>
			</author>
			<updated>2011-12-28T10:44:52Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=238137#p238137</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Разбивка папки на части]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=238130#p238130" />
			<content type="html"><![CDATA[<p>Всем привет.<br />Подскажите как правильно сжать папку 22Гб в архивы по 4ГБ (чтобы умещались на болванку) и с возможностью распаковки в Windows.<br />Спасибо.</p>]]></content>
			<author>
				<name><![CDATA[portos]]></name>
				<uri>https://linuxforum.ru/profile.php?id=19450</uri>
			</author>
			<updated>2011-12-28T10:27:35Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=238130#p238130</id>
		</entry>
</feed>
