Archive for June, 2013

The following is a video that shows the booting of Slackware64 14.0 under a Lenovo G470 + Samsung 840 256GB SSD combination. My total RAM is 8GB. I've logged in and issued a "startx" command at the end. You might be interested on how the mentioned SSD can improve one's boot time.



The following is a video showing the booting of Windows7 64-bit under a Lenovo G470 + Samsung 840 256GB SSD combination. My total RAM is 8GB. Windows7 may not be FOSS, but I thought that some people might be interested on how the mentioned SSD can improve the performance for the mentioned Operating System.



I've made a simple Perl backup script. Here are the features:

  • It will tar a directory you specify in a variable.
  • The filename/s of the archive/s created will have a prefix specified by you in a variable, and it will include the date when the archive was created. A sample filename is "Michael.Balcos-2013-06-23.tar.gz"
  • As for the destination directory for the archive/s, you can also set that.
  • Backup archives older than a specified number of days in the script will be deleted.

To download the script, please click this: backupScript.txt

Be very careful in setting the $backupDir variable (it sets the destination directory of your backup archive/s). Files which are older than the maximum age specified in the script will be deleted in the directory specified by the $backupDir variable.

If you'd like to use this script, please rename the backupScript.txt file to backupScript.pl, do a "chmod 710 backupScript.pl". I recommend that you use the script as root, thus please change the ownership by issuing a "chown root:root backupScript.pl". You can use this script in a cron job. Currently, I've tested this script in Slackware64 14.0. It should work in other distributions.

#!/usr/bin/perl
@timeStampTmp=localtime();
$timeStampFinal=sprintf("%04d-%02d-%02d", $timeStampTmp[5]+1900,$timeStampTmp[4]+1,$timeStampTmp[3]);
chomp $timeStampFinal;
$maxAgeInDays=2; # Backups older than this value (in days) will be deleted.
$backupDir='/backup'; # This is where your backup archives/tarballs will go.
$dirToBackup='/directory/To/Backup'; # This is the directory to be backup.
$backupFilePrefix='Michael.Balcos'; # Format of backup filename is "<$backupFilePrefix>-<$timeStampFinal>.tar.gz". Note that the whole absolute path ( except for the leading "/" ) will be stored in your archive/tarball.
$command='tar czpf '.$backupDir.'/'.$backupFilePrefix.'-'.$timeStampFinal.'.tar.gz '.$dirToBackup.' > /dev/null 2>&1';
system($command);
$command='find '.$backupDir.' -type f -maxdepth 1 -mtime +'.$maxAgeInDays.' -exec rm -f {} \;';
system($command);

I've basically abandoned this blog again for a year. Events such as getting married, moving to another residence, and changing jobs made it difficult for me to blog. Since this site is getting some attention, I intend to make posts again. My target is to have a post per week. Hopefully, my determination will push me to keep this promise.

I have modified the ProjectFiles rc.firewall script so that it can work in recent Linux distributions. Click here to get a copy. This was tested in Slackware64 14.0. To auto-run this in Slackware64 14.0, you can easily just copy the "rc.firewall2" script to "/etc/rc.d/rc.firewall", make the ownership "root:root", and make the permissions 755.

Here are the differences to the original ProjectFiles rc.firewall script:

# diff rc.firewall2 rc.firewall
1190c1190
< if (( `find /lib/modules/$(uname -r)/ -iname "*$1*.ko*" | cut -d/ -f5- | grep -c "$MODULE"` )); then --- > if (( `modprobe -l | grep -c "$MODULE"` )); then

Back to top