LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-26-2006, 03:29 AM   #1
ankscorek
Member
 
Registered: Mar 2003
Distribution: Slackware10.2,SUSE,FC,RHL,Vector Linux,WHAX,PHLAK,bt4,ubuntu,debian,aptosid,backtrack,blackbuntu
Posts: 529

Rep: Reputation: 31
compressing issues


hi

i uncompressed a file anks.bz2 using
#bunzip2 anks.bz2 //this gave me a compressed file called anks
#mv anks anks.tar
#tar -xvvf anks.tar

this gave me 3 dir anks1, anks2, anks3

i made the neccessary ammends in the dirs

now i want to compress them back as anks.bz2

what is the command for it?
 
Old 05-26-2006, 04:31 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Usually files that are tarred and bzip'ed, are created this way: tar cjf filename.tar.bz2 dir1 dir2 dir3.

The extension .tar.bz2 is used.
Look in the info manual for tar, because you may want to use additional options, such as one that tars files before the directories, so you don't end up, later when trying to extract, having the directory created with restricted permissions before the files are created.
 
Old 05-26-2006, 09:48 PM   #3
ankscorek
Member
 
Registered: Mar 2003
Distribution: Slackware10.2,SUSE,FC,RHL,Vector Linux,WHAX,PHLAK,bt4,ubuntu,debian,aptosid,backtrack,blackbuntu
Posts: 529

Original Poster
Rep: Reputation: 31
tar -cjvf anks.bz2 .
 
Old 05-26-2006, 11:19 PM   #4
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
tar jxvf anks.bz2 anks1 anks2 anks3
 
  


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
Compressing MP3's Boffy Linux - Software 1 02-15-2005 08:21 PM
compressing iso's jamalexa Linux - Newbie 3 10-27-2004 10:41 PM
compressing a file sanjith11 Linux - General 2 07-08-2004 04:42 AM
compressing files master Linux - Newbie 4 03-18-2004 12:48 PM
Compressing files GtkUser Linux - Software 1 04-02-2003 07:21 AM

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

All times are GMT -5. The time now is 11:14 AM.

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