FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 11-30-2007, 05:44 PM
"Ouattara Oumar Aziz (alias wattazoum)"
 
Default 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@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 11-30-2007, 09:10 PM
Felipe Figueiredo
 
Default question about TAR

Em Thursday 29 November 2007 20:14:18 Ouattara Oumar Aziz (alias wattazoum)
escreveu:
> 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 ?
>

have you tried this?

tar xf archive1.tar relative/path/to/file | tar rf
archive2.tar -


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-01-2007, 10:43 AM
"Ouattara Oumar Aziz (alias wattazoum)"
 
Default question about TAR

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

Felipe Figueiredo a écrit :
> Em Thursday 29 November 2007 20:14:18 Ouattara Oumar Aziz (alias wattazoum)
> escreveu:
>> 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 ?
>>
>
> have you tried this?
>
> tar xf archive1.tar relative/path/to/file | tar rf
> archive2.tar -
>
>
Hello, Just tried :

:~$ tar xf Document.tar Documents/WATTAZOUM.tar.gz | tar rf video.tar -
tar: -: ne peut stat: Aucun fichier ou répertoire de ce type
tar: Statut d'erreur reporté d'erreurs précédentes.

I had seen this kind of command but it was for transfering files from
one tape to another.



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

iD8DBQFHUUjP3oNqSZ7gEVoRAsvSAJ9sKF4+YSaAxxLxSyneuy QME0OnSgCg1ZMi
CVACgI3Hixjnp3pf1m/SI6s=
=MeYy
-----END PGP SIGNATURE-----


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-01-2007, 09:33 PM
Felipe Figueiredo
 
Default question about TAR

Em Saturday 01 December 2007 09:43:11 Ouattara Oumar Aziz (alias wattazoum)
escreveu:
> Felipe Figueiredo a écrit :
> > Em Thursday 29 November 2007 20:14:18 Ouattara Oumar Aziz (alias
wattazoum)
> > escreveu:
> >> 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 ?
> >>
> >
> > have you tried this?
> >
> > tar xf archive1.tar relative/path/to/file | tar rf
> > archive2.tar -
> >
> >
> Hello, Just tried :
>
> :~$ tar xf Document.tar Documents/WATTAZOUM.tar.gz | tar rf video.tar -
> tar: -: ne peut stat: Aucun fichier ou répertoire de ce type
> tar: Statut d'erreur reporté d'erreurs précédentes.

Ok, my french is a little rusty, so I'm guessing the message says I missed
something with the parameters, maybe their order.

I tried experimenting a bit. I've created tarfiles from pipes a million times,
but never really extracted to a pipe.

THEN, I did what we all should have done in the beginning, guess what it's
that?

You need -O in the extracting command:

tar xfO archive1.tar relative/path/to/file | cat

works to a test text file I used. THEN, when the tar rf comando didn't, I
remembered you're not adding a file to the tar2, but a stream. So, you don't
get a filename. Which is why if you try you'll get the error:

tar: Options `-Aru' are incompatible with `-f -'

with a french accent. Sorry.

> I had seen this kind of command but it was for transfering files from
> one tape to another.

That's exactly what you're trying to do, as far as tar is concerned.


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

Thread Tools




All times are GMT. The time now is 07:34 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org