ошибки команды tar “tar (ребенок): группа приключения liunx/: не Может открыться: каталог”

$ tar -czvf 'liunx adventure group'/ liunx\ adventure\ group/
tar (child): liunx adventure group/: Cannot open: Is a directory
tar (child): Error is not recoverable: exiting now
liunx adventure group/
liunx adventure group/datapacks/
liunx adventure group/advancements/
liunx adventure group/advancements/f10933e2-6368-4ffd-9d45-47f80e324ea1.json
liunx adventure group/session.lock
liunx adventure group/data/
liunx adventure group/data/map_1.dat
liunx adventure group/data/villages_nether.dat
liunx adventure group/data/villages_end.dat
liunx adventure group/data/idcounts.dat
liunx adventure group/data/scoreboard.dat
liunx adventure group/data/villages.dat
liunx adventure group/data/map_0.dat
liunx adventure group/region/
liunx adventure group/region/r.0.-1.mca
tar: liunx adventure group/: Wrote only 2048 of 10240 bytes
tar: Child returned status 2
tar: Error is not recoverable: exiting now

Моя команда неправильно?

-1
задан 20 December 2018 в 10:25

2 ответа

Как подсказки AmeyaVS -

Необходимо дать архиву tar имя, не каталог. tar НЕ добавит .tar/.tgz в Ваш архив.

tar (child): liunx adventure group/: Cannot open: Is a directory

говорит так, вполне ясно.

Подсказка: Вы не можете хотеть использовать -z (gzip) для сжатия. -J использование xz, который является более современным сжатием.

1
ответ дан 26 October 2019 в 19:31

Выполненный, что команда как это:

tar -czvf 'liunx adventure group'.tar.gzip liunx\ adventure\ group/

Не используйте пространство в сжатом имени файла, таким образом, вышеупомянутое было бы лучше похоже на это:

tar -czvf liunx_adventure_group.tar.gzip liunx\ adventure\ group/

Посмотрите man tar:

Compression options
       -a, --auto-compress
              Use archive suffix to determine the compression program.

       -I, --use-compress-program=COMMAND
              Filter  data  through  COMMAND.   It must accept the -d option, for decompression.  The argument can contain
              command line options.

       -j, --bzip2
              Filter the archive through bzip2(1).

       -J, --xz
              Filter the archive through xz(1).

       --lzip Filter the archive through lzip(1).

       --lzma Filter the archive through lzma(1).

       --lzop Filter the archive through lzop(1).

       --no-auto-compress
              Do not use archive suffix to determine the compression program.

       -z, --gzip, --gunzip, --ungzip
              Filter the archive through gzip(1).

Примеры использования:

tar -czvf liunx_adventure_group.tar.gzip liunx\ adventure\ group/
tar -cjvf liunx_adventure_group.tar.bzip2 liunx\ adventure\ group/
tar -cJvf liunx_adventure_group.tar.xz liunx\ adventure\ group/
1
ответ дан 26 October 2019 в 19:31

Другие вопросы по тегам:

Похожие вопросы: