Home » Distros » Centos

How to assign range of IP addresses in Linux?

As we know Linux allows to assign almost unlimited number of IP addresses to its interfaces. Such additional IPs applied to the same NIC are known as secondary IP addresses or just secondaries. Some time ago i faced a problem on how to apply about 500 IP addresses to one Linux box and then ensure that all of them get online after Linux reboots. There are several ways to accomplish this taks so i would like to share them all. Shell script with ifconfig commands … Read more

Home » Distros » Centos

The easiest way to split and merge pdf files in Ubuntu

Ubuntu (featured logo)

The easiest way to split, merge or edit pdf files in Ubuntu is to use pdftk utility. This rather old (latest version was released in 2006) but still simple and powerful program can be installed in Ubuntu (Debian or any deb-family Linux distribution) by the following command in terminal: sudo aptitude install pdftk (if you run Fedora, RedHat or CentOS use this one: sudo yum install pdftk) Split large pdf into many one-page files: pdftk largepdfile.pdf burst (as the result you will get many small … Read more

Home » Distros » Centos

Convert WMA to MP3 in Ubuntu

Ubuntu (featured logo)

In order to convert WMA file into MP3 format in Ubuntu (or Debian) you should install the following requirements first: 1. mplayer (sudo aptitude install mplayer) 2. lame (sudo aptitude install lame) 3. win32 codecs (sudo aptitude install ubuntu-restricted-extras) and then convert file.wma into file.mp3 using the following console command: mplayer -vo null -vc dummy -af resample=44100 -ao pcm:waveheader file.wma;lame -m s -V 3 audiodump.wav;mv audiodump.wav.mp3 file.mp3;rm audiodump.wav This also works for Fedora / Centos / Redhat family Linux distributions (requirements should be installed by … Read more

Home » Distros » Centos

Create .deb or .rpm from .tar.gz with checkinstall

Checkinstall is extremely useful utility to create .deb packages for Debian, Ubuntu (or .rpm packages for Fedora, RedHat, CentOs) from .tar.gz (or .tgz) source tarball after it’s compiled at your Linux box. In other words you can prepare binary package for later usage without need to compile software from sources every time you need to get it installed on certain Linux box. Another application of checkinstall is software deinstallation that was compiled and installed from sources. As you might already noticed, not every programmer adds … Read more

Home » Distros » Centos

Network Traffic Generator: hping

hping3 is a network tool able to send custom TCP/IP packets and to display target replies like ping program does with ICMP replies. hping3 handles fragmentation, arbitrary packets body and size and can be used in order to transfer files encapsulated under supported protocols. Using hping3 you are able to perform at least the following stuff: Test firewall rules Advanced port scanning Test net performance using different protocols, packet size, TOS (type of service) and fragmentation. Path MTU discovery Transferring files between even really fascist … Read more

Home » Distros » Centos

Get changelog information from RPM and DEB package

Here is a nice Linux tip: to get change information of some RPM package it’s enough to execute the following command rpm -q –changelog package for example rpm -q –changelog openssh will output something like: * Fri Mar 03 2006 Tomas Mraz <[email protected]> – 4.3p2-4 – allow access if audit is not compiled in kernel (#183243)</[email protected]> * Sat Feb 25 2006 Tomas Mraz <[email protected]> – 4.3p2-3 – enable the subprocess in chroot to send messages to system log – sshd should prevent login if audit … Read more