shell

How to block consecutive IP address using scripts

There are times that a server does not need to listen and process any TCP/UDP request for a long list of consecutive local IP addresses. This blog entry provides a starting point of creating server scripts to block a long list of consecutive IP address from the server for permanent blocking. To start, launch your [...]

How to recover root password on linux

Finally, the well known root password recovery is here to stay. This old time favorite superuser root password recovery in linux comes as handy as a toolbox. Recovering root password in linux is as handy as newbie users during the very first linux installations. The simplest way to recover root password before kernel can be [...]

How to take Linux backups powered by Tar

This document entry however covers a foundation approach and mostly used tar arguments on backing up data using the linux command tar. ============================================= Data backup samples using Tar Linux command ============================================= A very simple usage of tar # tar cvf backup.tar * Legend: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -c create a new tar file -v verbose mode -f select [...]

How to take Linux backups powered by Rsync

RSync backups data and does it very clean and well. Rsync only transfers those data that have been modified and changed so that the destination host has an exact replica from the source host. Rysnc is a command line backup tool that handles data transfers in an effective and secure manner like any other known [...]

Blue screen troubleshooting tips – Windows

Normally, the blue screen of death contains a driver name, and some addresses; if you’re lucky, removing that driver will do the trick. But what if there is no driver name on the BSoD? And what if you don’t have all the skills to play with crashdumps and debuggers? In this case, Autoruns comes to [...]

How to Spell Check Files via Terminal

Here’s another useful command liner utility that can check and correct spelling of a file. How to check the spelling of a HTML file from terminal? How to check the spelling of a Latex file from terminal? How to check the spelling of a nroff/troff file from terminal? How to check spelling of a file [...]

How to Back Up and Restore a MySQL Database

If you’re storing anything in MySQL databases that you do not want to lose, it is very important to make regular backups of your data to protect it from loss. This tutorial will show you two easy ways to backup and restore the data in your MySQL database. You can also use this process to move [...]

How to Determine Domain’s Expiration Date From Linux Terminal

Determining domain expiration is also part of an IT web-enabled infrastructure. There are a lot of window softwares that queries the internet for the domain’s expiration date. Here’s an easy way on how to display your domain’s expiration date using linux terminal command in a single shot. Check Domain Expiration Date # whois yourdomain.com The [...]

How to Prevent Binary Execution From Mounted Device

Most probable reasons of leaving a post-compiled trojan programs after successfully exploiting a system is brought about by small percentage of having increased security by root not to enable user from compiling a program source, or run executable scripts and binary programs from particular device. How to mount your device to further prevent script execution [...]

How to Find And Count JPG Files Recursively

I have been busy playing around with more than 100,000 images and JPG files from my hard drive and I just realized that I was issuing a few set of commands redundantly specially on counting the number of images from categorical ‘named’ folders alone and from its sub ‘event-folders’ recursively. Here’s how to find and [...]

How to Convert First Letter of Dir Folder to Uppercase

Well, if we can convert the first letter of each lines from a text file, we can use the same approach to convert the first letter of a directory or folder name to its uppercase as well, simply add the linux mv command. If you have hundreds of directory name in one location that starts [...]

Shell: Shortcut To Last Command Line Argument

Have you noticed at times that you have been entering same command line parameter over and over again during a certain portion of your shell works? Have you ever been tired of entering the last command line argument over and over again? Here’s a quick and simple short tip on how to execute shortcut combination [...]

Rsyslog – Most Advanced Log Server

Rsyslog is an enhanced syslogd supporting, among others, MySQL, PostgreSQL, failover log destinations, syslog/tcp, fine grain output format control, high precision timestamps, queued operations and the ability to filter on any message part. It is quite compatible to stock sysklogd and can be used as a drop-in replacement. Its advanced features make it suitable for [...]

How To Make Use of UMask

Changing file permission is a file security thing. Any file owned by another user with improper file permissions could grant file access for free to any system users. This could also lead to super user access to the whole operating system in the case of improper default umask value with shadow and password files. Introducing [...]