recursion

How to use Grep command – Linux Popular Command

Grep is by far the most popular command that exists in Unix. Though some may argue about that, but once you begin using grep, it would always be present in all your complex commands that you think of executing at the shell prompt. grep stands for ‘global regular expression printer‘ . Which makes no sense [...]

How to Configure your DNS to protect against DoS attacks and Cache Poisoning

Somewhat similarly to Open Mail Relays, Open DNSs are not a good thing in this modern world. What used to be a friendly and neighbourly action, an Open DNS, may now be – inadvertently – placing yourself and others at risk for three major reasons

Ways to compress and uncompressed files in linux

Here are simple ways to package, compress and uncompressed files in linux. For simplicity, only the basic parameters were used from the sample issued commands. Let us change folder first and go to /tmp temporary and create 3 zero-sized files. # cd /tmp # touch file1 file2 file3 Now, do our thing # zip zipped.zip [...]

How to find and delete files recursively

Quick and dirty way of deleting a file named “vertito” recursively starting from / . Let’s find those files named “vertito” and list them out first: # find / -name vertito -exec ls -la {} \; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -rw-r–r– 1 root root 0 2007-07-17 22:52 /home/ver/vertito -rw-r–r– 1 root root 0 2007-07-17 22:52 /home/folder2/vertito -rw-r–r– 1 [...]

50 quick linux command tips

1. How to you change file ownership and chown files recursively? # chown user:user folder -R 2. How to view queued mail in sendmail or postfix? # mailq 3. How to show which alternative binary program does your machine executes first? # alternatives –display program-name 4. How to create public/private rsa key pair? # ssh-keygen [...]

How to delete spam email and folder regularly – Linux

Fighting spam email is a worldwide daily combat challenge. Email spam fight is just another daily server wide monitoring function of any sysad administering those email servers. Global spam email attacks and happens everyday regardless of country, server setup, domains, geolocation and public IP address you might have. Take a look of the top country [...]

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 [...]

How to Install and Configure a Caching DNS server

BIND DNS are nameservers responsible basically for resolving domain names or hostnames into their equivalent IP addresses. Websites or domain names have their own equivalent IP addresses that are usually managed and provided by the same website firms. If somebody is browsing a website from his browser, this website is being resolved, looked up and [...]

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 Delete Linux Files Older Than 360 days

Searching files recursively for deletion can be real exchausting specially if the target files are queried by their file age. Recursive searching in all linux distribution can be done by using linux find command as find linux command makes recursive searches real easy. Find command is so powerful that it can actually boosts file management [...]

How To Install and Configure Caching DNS on Fedora

BIND DNS are nameservers responsible basically for resolving domain names or hostnames into their equivalent IP addresses. Websites or domain names have their own equivalent IP addresses that are usually managed and provided by the same website firms. If somebody is browsing a website from his browser, this website is being resolved, looked up and [...]

SSH and SCP: Howto, tips & tricks

SSH SSH is some kind of an abbreviation of Secure SHell. It is a protocol that allows secure connections between computers. In this tutorial, we’ll be dealing with the ssh command on Linux, the OpenSSH version. Most Linux distributions feature the OpenSSH client today, but if you want to be sure, have a look at [...]

How DNS Works

Domain name Servers (DNS) are an important but invisible part of the internet, and form one of the largest databases on it. Each machine on an internet is assigned a unique address, called an IP address, which is 32 bit number and is expressed as 4 octets. The method user to represent these IP addresses [...]

28 Steps on how to harden your Linux server

If you run your own Linux server here are some tips on server hardening, liberally stolen from the CFS security GUI script for cPanel/WHM, that I have become only too familiar with since yesterday: On your firewall (you do have one don’t you?) check the incoming MySQL port and if 3306 is open, close it. [...]