jump to navigation

Creating & Storing Archive Files April 6, 2007

Posted by jmonreal in Linux.
trackback

Today I wanted to use tar and bzip2 to storage a few files, I ask some friends they didn’t know for sure how to do it, so I ask to our friend Google, and the commando info.

So here is what I did, first of all I used tar and then I compressed the tar file

myuser@mycomputer:~/ tar cvf file.tar files/

With the option c we tell tar that we want to create a file, v prints out the files that are being compressed to tar, and f tell the file on wich to work on.

myuser@mycomputer:~/ bzip2 file.tar

That will create a filename like file.tar.bz2

If we want to decompress the file, we have 2 options,

All at once,

myuser@mycomputer:~/ tar xjvf file.tar.bz2

With x we tell tar to extract the file, j that it is a bz2 compressed file, v to print out the files that are being uncompressed, and f the file to work on.

or step by step,

myuser@mycomputer:~/ bunzip2 file.tar.bz2

myuser@mycomputer:~/ tar xvf file.tar

I hope you’ll find it useful…

Advertisement

Comments»

1. Alejandro - April 6, 2007

Hola :) interesante articulo :) aunque parece que hay una manera gráfica de hacerlo :)

Estás tratando de reemplazar a ‘man’ parece :P

Saludos!!!


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.