extract one file from a tar.gz

Reading Time: < 1 minuteYou can simply use the following syntax:

[root@blub ~]# tar tzvf mytar.tar.gz
That will show you the list of files in the tar. t means test
 
[root@blub ~]# tar tzvf mytar.tar.gz myfile.txt
 -rw-rw-r-- scm/scm 373093723 2010-09-17 17:58:21 myfile.txt
You can do the same with a target file and test that one specific file really belong to a tar.gz

Finally you can extract that single file.

How to check if Virtualization is supported for your CPU

Reading Time: < 1 minute

Many ways
1. Use the following command:

Make a virtual machine out of a G4L archive

Reading Time: < 1 minuteSo I took a backup of a disk using G4L.
Let’s import it into a virtual machine on a RedHat running Xen.

virt-install --import --file <myfile> --prompt

answer the few questions.
Choose "Fully Virtualized".
Turn the SELinux into permissive mode in order to configure the network. This is a known bug and it looks like it’s not corrected yet.

setenforce Permissive

Once the import is done your virtual machine should pop and boot properly.

 

Transfer a very big file very fast

Reading Time: < 1 minute

ssh server "gzip -c remote_file " |gunzip > local_file