Skip to main content

Uncompress tar.gz tar.bz2 the easy way.

Usually uncompressing a tar'ed compressed file requires the use of two utility and pipe '|' through each other. Today, I found an easy way to to that.

Traditionally,

to extract tar.bz2 , we use  bzip2 -cd files.tar.bz2 | tar xvf -   and so with .gz files


the easy way is this way,



tar xvzf file-1.0.tar.gz - to uncompress a gzip tar file (.tgz or .tar.gz)
tar xvjf file-1.0.tar.bz2 - to uncompress a bzip2 tar file (.tbz or .tar.bz2)
tar xvf file-1.0.tar - to uncompressed tar file (.tar)
  • x = eXtract, this indicated an extraction c = create to create )
  • v = verbose (optional) the files with relative locations will be displayed.
  • z = gzip-ped; j = bzip2-zipped
  • f = from/to file ... (what is next after the f is the archive file) 

Try out, cause i've already try it out and it works.

Comments

Popular posts from this blog

SQL Tips : EXTRACT function as alternative to TO_CHAR

You want to create a sql to list data group in year (datetime datatype). Example as below : The table is smp.SC03F_TEMP with over 10 million rows. Usually, if there something deals with date we will use to_char function. As an alternative, you can use extract function to extract certain part of the date. In belows example, we extract the year of a column. As we can see the time taken is almost half for 10 million rows. Happy trying. select count(*) from smp.SC03F_TEMP; -- 10,866,921 records select count(*), to_char(A.SC03TARIKH, 'YYYY') from smp.SC03F_TEMP a group by to_char(A.SC03TARIKH, 'YYYY'); -- Time taken 54sec

Kill the Ads, Save the Bandwidth.

Remember the time when your browsing is like a breeze, pages appear almost instantly and reading mail is... reading mail without distraction of little animation called ads at the side of your browser. Well those days are over as advertisement plays an important role in getting revenue and for some, thats how they make the site running. Sometimes ads are good as 'second opinion' when you are shopping online, but too much of it will clouds your decision and might end up buying unnecessary thing. For the organization, unnecessary ads will consume the bandwidth thus affecting productivity. So, how to control this ? If Firefox is your number one browser then fear not, ads filtering is very easy to setup. Just follow these simple steps :

Virtualbox : Shrink VM disk

So you've finally succeeded running a windows virtual machine (VM) on your desktop. You play around the vm; copying files, installing & deleting applications and so on. After a while, you found out that your vm is using let say 20gb out of 100gb (which you set during creating the vm) disk but your local machine (host) report that you have used up 50gb. So how can you claim back that extra 30gb in your host ?