Sometimes it is neccessary to copy the partition-table of one disk to another. Mostly this is needed when a disk should be replaced on a software-raid-array. The method described here also works for GPT-Tables..
OpenSSL is a very powerful tool. This article shows very useful and common use-cases for openssl, starting from generating self-signed certificates...
Today I installed zfs on debian. The installation was straight forward but later I had some problems with my pool. After every single reboot, I had to import the zfspool manually("zpool import -a"). I searched the internet for a proper solution, but I just found something like: "use ZFS_MOUNT=yes in /etc/default/zfs". Even with this option it just doesn't automatically import my pools.
I solved this with the following entry in /etc/default/zfs:
dr@tardis> for i in `ls -d *`; do du -hs $i; done 4,0K cron-job.txt 48K etc 4,0K install.sh 4,0K README.Debian.TXT 4,0K README.TXT 16K usr
At the moment there is a great hype about "docker", even if the technique isn't new. So what's so great about it?
In this article i want to describe how to create a "Debian Wheezy"-Image using "debootstrap". This debianwheezy-image will be the base for our "dockerfile". The dockerfile itself will create another image called "hoti/drupal-dev". In this dockerfile we will pre-install a ssh-server,mysql-server, apache2-server, php5, drush and drupal.
It happens many times that a server run for month or years and then the system administrator has to reboot it and it doesn't come up again because the power supply(or other hardware) is damaged. At this point someone says with the voice of a teacher: "Never change a running system". It's the same with software-updates. The system runs many years without any updates, and then we have to upgrade it and nothing works. And again, someone from behind says with the voice of a teacher: "Never change a running system". Those are the days where my left eye starts to twitch and I tend to get crazy...
In this article i want to show how to convert a UNIX-Timestamp intoto a readable time-format
Removing empty lines with sed:
sed '/^$/d' myFile > newFile
Here are a some examples how to loop over a range of numbers using a "for-loop".
BTW: this is the first article for our lovely series: "One-Liners"...