LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-02-2008, 08:28 PM   #1
DaveQB
Member
 
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: Debian, Ubuntu
Posts: 400

Rep: Reputation: 39
Piping tar bzcat to add a file to a tar.bz2 archive


Not sure if the title is clear what I want.

This is more out of curiosity.

Is it possible to add a file to tar.bz2 archive without first bunzip2ing it to disk ?

If I dont make sense, read on...


I have a store.tar.bz2 archive and want to add a file to it, call it file

I know I can bunzip it to have a tar file, then add the file with the tar -rf command and then bzip2 again, but without extracting to disk, using pipes, is it possible ?

Best I got was:

Code:
bzcat store.tar.bz2 | tar r - file | bzip2 - store2.tar.bz2

But that fails

Code:
tar: Options `-Aru' are incompatible with `-f -'
Try `tar --help' or `tar --usage' for more information.
bzcat: Can't open input file store.tar.bz2: No such file or directory.
bzip2: Can't open input file store2.tar.bz2: No such file or directory.
No big deal, just curious.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
How to list the files in my tar.bz2 archive ??? merlin23 Linux - Newbie 13 12-14-2004 08:50 AM
Extracting tar.bz2 archive through console grim_chel Linux - Newbie 3 06-28-2004 11:27 AM
Tar gives error when creating a tar file archive davidas Linux - Newbie 10 04-13-2004 12:35 AM
problem unzipping a tar.bz2 file tar: Error is not recov jyome Linux - Software 4 09-04-2003 01:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration