Re: question about TAR



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Owen Townend a écrit :
On Thu, 2007-11-29 at 23:14 +0100, Ouattara Oumar Aziz (alias wattazoum)
wrote:
Hello

I would like to know if it's possible to transfer a file from one tar
archive to another (without untarring it on the disk)

For example , I have a 2GB dir in a TAR archive and I want to transfer a
subdir of 1GB to another TAR file. I don't have 1GB free on my disk .
Can Tar handle this ?

Best regards
wattazoum



Hey,
Tar can add to an existing archive (--append or --concatenate), so the
second part's OK. Tar can extract parts of and archive (--extract) and
tar can remove parts of an archive (--delete) but I am not sure there is
a way to use all of these simultaneously to facilitate a move. Some disk
space will need to be used.
Depending on the file sizes you may be able to use the available space
and do the move in many small steps instead of one large one. Another
option could be to extract the files to an external storage medium,
remove them from the previous archive before then re-reading them into
the new archive.
Do you have other IO available if there's no disk space? A spare tape
or networked machine?

Just some thoughts.

cheers,
Owen.

Thank you very much for your answer. I think I'll do it using the disk (
extracting and reTarring it back ) one file at a time.

This is for a backup software that I am developing that's why I needed
to have a generic way to do it (without assuming that the user have some
free hardrive ) :-)

Thanks again
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHUFoA3oNqSZ7gEVoRAvrnAKCk+2ZfzOtRf2Xx+c/sk3wlrFjWlwCgpobn
6VMVW8f3Er7PMkvytVRi7nE=
=e1GD
-----END PGP SIGNATURE-----


--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • Re: question about TAR
    ... I would like to know if it's possible to transfer a file from one tar ... I don't have 1GB free on my disk. ... Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org ... option could be to extract the files to an external storage medium, ...
    (Ubuntu)
  • Read README from .gz archive
    ... I should be able to do it with tar and a pipe, ... Yes, I can use the -t option to locate it, and then extract it to a ... file, but I just want to read it, not write it to disk. ... Bill Roberts ...
    (comp.unix.questions)
  • Re: converting .zip to .tar.gz or to .tar.bz2
    ... Keith> decompression, but not necessarily to disk. ... Keith> perhaps to /tmp) to tar (which can use only the disk you ... That's why to extract a tiny file from a huge .tar.gz file, ...
    (comp.os.linux.misc)
  • Re: How to "wipe" ALL Mac files slack space?
    ... would need to install both minimum OSX and minimum Vista. ... there is no guarantee that tar will work properly with OSX ... Microsoft is known for creating position-dependent files on disk, ...
    (comp.sys.mac.system)
  • Re: O_DIRECT question
    ... It should return the number of bytes successfully written before the error, giving you the location of the first error. ... but you do need to be sure it has hit the disk before continuing. ... The pipe fills up quickly while dd is blocked on the sync write, which then blocks tar until all 16 MB have hit the disk. ... Semantics deals with the state of the machine after the call, not how quickly it got there. ...
    (Linux-Kernel)