Dec 22 2008

Sed Introduction and a nice tutorial

Tag:tepezcuintle @ 2:44

Found at http://www.grymoire.com/Unix/Sed.html

Thanks for making this the number #1 page in Google on ’sed’!

Sed - An Introduction and Tutorial

Bruce Barnett


Last update: Sun Jul 20 21:59:55 EDT 2008

Thanks to Keelan Evans, Fredrik Nilsson, and Kurt McKee for spotting some typos.

Thanks to Wim Stolker and Jose’ Sebrosa as well.

Thanks to Olivier Mengue.

Thanks to Andrew M. Goth.

Thanks to David P. Brown.

Thanks to Axel Schulze for some corrections

A big thanks for Fazl Rahman for spotting dozens of errors.

Table of Contents

Continua”Sed Introduction and a nice tutorial”


Dec 21 2008

Find CPU hog processes on a Red Hat Machine

Tag:tepezcuintle @ 23:55

I found this command useful in finding out which top 10 processes are hogging my CPU resources. Note that this command is specific to the Red Hat flavor of Linux. See the man page for ps for the correct output format to use for your specific platform:
Continua”Find CPU hog processes on a Red Hat Machine”


Dec 21 2008

Perl Module Remover script

Tag:tepezcuintle @ 23:47

Have you ever installed a perl module that later didn’t work with your system or broke things, or maybe you want to remove a new module and install an older one.
Continua”Perl Module Remover script”


Dec 21 2008

Centos 5.0 Install all available Perl Modules

Tag:tepezcuintle @ 23:28

This Sunday I was building another server where I can run some Chatbots but the cpan setup kept failing. A lot of modules were broken and they didn’t work. On a blog I read that you need to make sure you have the majority of perl modules available on the Centos 5.0 repo. I didn’t know the list of all the available perl Modules but here is how you can install all of them.

Continua”Centos 5.0 Install all available Perl Modules”


Dec 17 2008

Optimizing Apache 1.3 Old but still useful for legacy machines

Tag:tepezcuintle @ 22:23

Apache 1.3 Process Model Overview







Apache 1.3 on UNIX is
a pre-forking process per request server. When the Apache parent
process is started, it forks a number of child
processes that are responsible for accepting connections off the listening
sockets. When a connection is received, the system wakes up one of the processes
to handle the connection. Since Apache does not do asynchronous network I/O,
Apache needs a process to handle each concurrently connected
browser and client. For example, Apache needs 1000 processes to handle 1000
concurrently connected clients, or connections.

Continua”Optimizing Apache 1.3 Old but still useful for legacy machines”


Dec 17 2008

RPM is your friend

Tag:tepezcuintle @ 22:18

RPM Commands

by Jeff Hunter, Sr. Database Administrator

This document contains an overview of the principal RPM commands for
installing, uninstalling, upgrading, querying, listing, and checking RPM packages
on your Red Hat Linux system.


# rpm -ivh foo-2.0-4.i386.rpm
# rpm -i ftp://ftp.redhat.com/pub/redhat/RPMS/foo-1.0-1.i386.rpm
# rpm -i http://oss.oracle.com/projects/firewire/dist/files/kernel-2.4.20-18.10.1.i686.rpm

Used to install a RPM package. Note that RPM packages have file naming conventions
like foo-2.0-4.i386.rpm, which include the package name (foo), version (2.0), release (4),
and architecture (i386). Also notice that RPM understands FTP and HTTP protocols for installing
and querying remote RPM files.


# rpm -e foo

To uninstall a RPM package. Note that we used the package name foo,
not the name of the original package file foo-2.0-4.i386.rpm above.


# rpm -Uvh foo-1.0-2.i386.rpm
# rpm -Uvh ftp://ftp.redhat.com/pub/redhat/RPMS/foo-1.0-1.i386.rpm
# rpm -Uvh http://oss.oracle.com/projects/firewire/dist/files/kernel-2.4.20-18.10.1.i686.rpm

Continua”RPM is your friend”


Dec 13 2008

Cool stuff you can do with netcat

Tag:tepezcuintle @ 2:38

One of the Linux command line tools I had initially under-estimated is netcat or just nc. By default, netcat creates a TCP socket either in listening mode (server socket) or a socket that is used in order to connect to a server (client mode). Actually, netcat does not care whether the socket is meant to be a server or a client. All it does is to take the data from stdin and transfer it to the other end across the network.

Continua”Cool stuff you can do with netcat”


Dec 12 2008

Conditions in bash scripting ( if statements )

Tag:tepezcuintle @ 20:25

Introduction

Bash features a lot of built-in checks and comparisons, coming in quite handy in many situations. You’ve probably seen if statements like the following before:

if [ $foo -ge 3 ]; then

The condition in this example is essentially a command. It may sound strange, but
surrounding a comparison with square brackets is the same as using the
built-in test command, like this:

Continua”Conditions in bash scripting ( if statements )”


Dec 05 2008

Compiz Fusion Keyboard shortcuts

Tag:tepezcuintle @ 5:43

For Linux users who are fortunate enough to be playing with the Desktop Effects on their favorite Linux distribution - mine is Ubuntu, here’s a list of keyboard shortcuts for the Compiz Fusion Desktop Effects that you may have been looking for. I have put together a list mainly because I’ve had a hard time finding a comprehensive list from a single location. I may have missed something, so please let me know. One more thing, the Super key is the Windows key in case you are wondering. Here are the shortcuts.

Continua”Compiz Fusion Keyboard shortcuts”