feed-image  ISSN 1836-5930

linux

Linux eBooks FREE Download

A Newbie's Getting Started Guide to Linux

Linux from Scratch - Create Your Own Linux System - Free eBook

Linux: The Hacking Solution (v.3.0)

The GNU/Linux Advanced Administration

A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)

Advanced Bash-Scripting Guide


Poll

Do you care about your privacy when using a FACEBOOK?
 


Partner Linux Sites: TuxMachines
Monsterb
LinuxBloggers
AdamsInfo
LinuxScrew
All For Linux

LINUX ADMINISTRATION NOTES & CODE SNIPPETS

Ubuntu and Debian google-talkplug installation howto

Installing this plugin on any Linux system should be a easy task. First download google-talkplugin_current_i386.deb package. On a Ubuntu system use: sudo dpkg -i google-talkplugin_current_i386.deb on a system where sudo is ...

Read more ...

WWW Mechanize - 401 Authorization Required

Here is a small script on how to login to a .htaccess protected page. Suppose that URL we want to login to is: http(:)//www(.)example(.)com/ and here are credentials required to login: username: www password: ...

Read more ...

Extract email address from a text file

A following perl script and regular expression extracts all email addresses from an given text file. Sample text: This perl script extracts all email addresses from an given text file. This email ...

Read more ...

Regular expression to validate credit card number

Credit card numbers contain four groups of numbers where each group contains 4 numbers. The following regular expression ( regexp ) will accept all credit card number in this format: ...

Read more ...

Regular Expression to validate US postal codes

Simple way to validate US postal codes using regular expression and optionally bash. US postall codes accept five digit ZIP number + optional 4 digit code. For example 32344-4444 and ...

Read more ...

vfat file system - unable to create uppercase directory name

Are you unable to create uppercase directory name on your storage device mounted as vfat file system. The reason for this behavior is that vfat filesystem is by default mounted ...

Read more ...

How To secure ssh

Here are couple ways on how to change your sshd default configuration settings to make ssh daemon more secure / restrictive and thus protecting your server from unwanted intruders. NOTE: Everytime you ...

Read more ...

Falling back to the standard locale - Solution

A following warning message may appear on your Linux terminal: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = ...

Read more ...

More in: Linux administration notes & code snippets

-
+
8
Linuxconfig.org
Building Linux kernels the Debian way

This short article describes the quick and easy way on how to customize, build and install Linux kernel under Debian or Ubuntu Linux. First, we will install all prerequisites then download kernel source. Next step will be customization and as a last step we will create and install a Debian package with new Customized Linux kernel.

Prerequisites

Let's start with first step which is installation of all prerequisites:

# apt-get install bzip2  build-essential \ 
kernel-package libncurses5-dev

Kernel build and customization

Next step is to download kernel source code from kernel.org. Untar and cd inside the kernel's directory tree:

$ tar xvjf linux-2.6.34.tar.bz2
$ cd linux-2.6.34

At this point we will do the most important part of creating new customized kernel and building a Debian package. This is all done with a single make-kpkg command.

NOTE:

Optional step is to apply kernel patches before running a following command:

make-kpkg --rootcmd fakeroot --config menuconfig --initrd --us --uc kernel_image
  • --us do not sign source
  • --uc do not sign changelog
  • --initrd perform any actions necessary for a kernel loaded using initrd
  • -- rootcmd fakeroot command that provides a means of gaining super user access
  • --config menuconfig will use menuconfig as a configuration tool where default is oldconfig
Read more...
 
Linux WD EARS Advanced Hard Drive Format

Introduction

Nowadays hard drive manufactures are switching to a new hard drive technology which uses 4KB sectors size instead of conventional 512B.  This new technology requires little tweaks to get a better performance in comparison to out-of-the-box settings. This article will describe some simple to follow instructions on how to partition the WD EARS hard-drive to get better overall performance. Getting the partitioning part done by aligning each partition can rapidly increase a hard drive's performance.


512B sector size standard is here for over 30 years and therefore lots of the code written for a Linux OS has 512 number hard coded in its source.
The main idea in regards to the 4 096 B size sectors is to increase the bit density on each track by reducing the number of gaps which hold Sync/DAM and ECC ( Error Correction Code ) information between each data sectors.  Therefore, for 8 x 512 B sectors the track also holds 8 sector gaps.

By having one single sector of size 4 096 B ( 8 x 512 B )  the track holds only 1 sector gap for each data sector thus reducing an overhead for a need to support multiple Sync/DAM and ECC blocks and at the same time increasing bit density.

Linux partitioning tools by default start each partition on sector 63 which leads to a bad performance of WD EARS hard-drives since they are not aligned to 4K sector from the beginning of the track.

For this article I'm using WDC WD10EARS-00Y5B1. This is a 1TB SATA hard-drive with 64MB cache memory.

WDC WD10EARS-00Y5B1 EARS WD advanced format

Read more...
 
Image Processing, Linear stretch and OpenCV

In attempt to recognize objects by examining images, various Image processing and analysis techniques are applied. This article briefly describes linear stretch algorithm and its use within OpenCV.


Linear stretch technique can be applied to images where substantial lack of contrast can result in false identification of objects, its spacial relationship and significance. Contrast enhancement by linear stretch can be applied to images with very low or very high variations of brightness. To apply the Linear stretch algorithm an image needs to be converted into gray-scale and all 8bit pixels and its values are recorded into histogram.

Read more...
 
Bash scripts to scan and monitor network

This article provides few simple scripts to scan and monitor network using combination of bash and ping command. Obviously, these scripts are no match to a full monitoring dedicated software like nagios but they could be useful for a small home brand networks, where implementing sophisticated monitoring system can become an overhead.

Scan network subnet

In this example the bash script will scan network for hosts attached to an IP address 10.1.1.1 - 255. The script will print message Node with IP: IP-address is up if ping command was successful. Feel free to modify the script to scan your hosts range.

#!/bin/bash

is_alive_ping()
{
  ping -c 1 $1 > /dev/null
  [ $? -eq 0 ] && echo Node with IP: $i is up.
}

for i in 10.1.1.{1..255} 
do
is_alive_ping $i & disown
done

Execute:

./bash_ping_scan.sh

OUTPUT:

Node with IP: 10.1.1.1 is up.
Node with IP: 10.1.1.4 is up.
Node with IP: 10.1.1.9 is up.
Read more...
 
«StartPrev12345678910NextEnd»

Page 3 of 11