Reading Time: < 1 minute
First you need pv, Pipe Viewer
[bash]$ apt-get install pv [bash]$ SIZE=`du -sk some-folder | cut -f 1` [bash]$ tar cvf - some-folder | pv -p -s ${SIZE}k | gzip -c > folder.tar.bz2
Reading Time: < 1 minute
First you need pv, Pipe Viewer
[bash]$ apt-get install pv [bash]$ SIZE=`du -sk some-folder | cut -f 1` [bash]$ tar cvf - some-folder | pv -p -s ${SIZE}k | gzip -c > folder.tar.bz2
Reading Time: < 1 minuteYou can simply use the following syntax:
[root@blub ~]# tar tzvf mytar.tar.gz
[root@blub ~]# tar tzvf mytar.tar.gz myfile.txt
-rw-rw-r-- scm/scm 373093723 2010-09-17 17:58:21 myfile.txt
Finally you can extract that single file.
Reading Time: < 1 minute
Many ways
1. Use the following command:
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.
Reading Time: < 1 minute
ssh server "gzip -c remote_file " |gunzip > local_file
Reading Time: < 1 minute
There are numbers of tutorials on the net on how to configure access from one machine to another without typing a password.
Here is the real way to do it.
First generate a pair of keys:
ssh-keygen -t rsa
It’s important to choose a passphrase. Don’t leave it blank.
Then you need to copy the public key to the other server
ssh-copy-id -i .ssh/id_rsa.pub>
Make sure that ssh-agent is running.
Add a key using ssh-add
ssh-add
Try connecting
Should be working.
Reading Time: < 1 minute
xterm -C
opens an xterm with console messages
Reading Time: < 1 minuteSometimes it can be hard to resolve a dependency with rpms.
rpm -qpl *
will show the list of all the files installed with a list of rpm in the running directory.
rpm -qpl * | grep libcc
will show me the files that resolve a specific dependency.
Reading Time: < 1 minute Finding more information with man pages
man -a intro (and press q)
shows the list of man books:
1 – introduction to user commands
2 – system calls
3 – library functions
4 – special files
5 – file formats
6 – games
7 – overview, conventions, and miscellany section
8 – administration and privileged commands
Reading Time: < 1 minute Xen is the virtualization tool for Redhat.
3 packages are needed: kernel-xen, xen, virt-manager
in order to create a new virtual machine:
virt-install
in order to start, create, destroy, stop, list virtual machines:
virtsh or xm
graphical user interface:
virt-manager