Nov 30 2006

Good Sed Tutorial

Tag:tepezcuintle @ 20:24

One of the basic philosophies of Linux (as with all flavours of Unix) is that each program does one
particular task, and does it well. Often you combine several programs to achieve something, either at the
shell prompt or in a script, by piping the output of one program into the next. I’m talking about things
like

Continua”Good Sed Tutorial”


Nov 25 2006

Shell Scripting Quick Guide

Tag:tepezcuintle @ 17:35

A quick guide to writing scripts using the bash shell

A simple shell script

A shell script is little more than a list of commands that are run in sequence.
Conventionally, a shellscript should start with a line such as the following:

#!/bin/bash

THis indicates that the script should be run in the bash shell regardless
of which interactive shell the user has chosen. This is very important,
since the syntax of different shells can vary greatly.
Continua”Shell Scripting Quick Guide”


Nov 24 2006

Sed a Stream Editor

Tag:tepezcuintle @ 18:55

Sed is a very useful (but often

forgotten) UNIX stream editor. It’s ideal for batch-editing files or for creating shell scripts to modify

existing files in powerful ways. This article builds on my previous article introducing sed.

Substitution!

Continua”Sed a Stream Editor”


Nov 21 2006

Shell Scripting Small Tutorial

Tag:tepezcuintle @ 16:45


Introduction To Bash Shell Scripting

References

  • Learning the Bash Shell, Cameron Newham & Bill Rosenblatt (O’Reilly & Associates, Inc)
  • Linux in a Nutshell, Jessica Perry Hekman (O’Reilly & Associates, Inc)
  • The UNIX Programming Environment, Brian W Kernigham & Rob Pike (Prenice Hall)
  • Unix Power Tools, Jerry Peek, Tim O’Relly, & Mike Lookides (O’Reilly & Associates,Inc)
  • Advance Bash Scripting Guide : http://www.tldp.org/LDP/abs/html

    Appendix B has some good Reference Cards

Continua”Shell Scripting Small Tutorial”


Nov 17 2006

Linux Performance Monitoring Tutorial

Tag:tepezcuintle @ 18:12

Mike Chirico (mchirico@users.sourceforge.net) or (mchirico@gmail.com)
Copyright (c) 2005 (GNU Free Documentation License)
Last Updated: Fri Dec 2 07:28:29 EST 2005

[http://souptonuts.sourceforge.net/performance_tutorial.html]

Performance Monitoring on Linux

The steps in this document were tested with Fedora Core 4.

oprofile - steps for running oprofile on Fedora.

Although it is possible to get an RPM with Red Hat’s vmlinux in it, I
personally prefer recompile the kernel from source.
The kernel source code contains a wealth of information. Reference
the Documentation folder to start. Later take a look at lxr, glimpse,
and patchset, which are powerful tools for searching and understanding
the kernel source.
(Reference TIP 117)

Continua”Linux Performance Monitoring Tutorial”


Nov 17 2006

How to increase your swap file on Linux

Tag:tepezcuintle @ 18:02

How to increase swap space with a swap file

All of your devices function, and everything is configured just the way you like it. At least you think so, until you start running out of memory when you have OpenOffice.org and lots of browser tabs open simultaneously. You realize you should have specified a larger swap partition during your install. this smiple method of installing gain .swap partition.

Continua”How to increase your swap file on Linux”


Nov 17 2006

Quick MySQL install for Red Hat Systems

Tag:tepezcuintle @ 17:54

MySQL is easiest to install on Red Hat systems using the RPM packages. To install MySQL in the same directory as the RPM packages use the command:
# rpm -Uvh *.rpm

Note: You most likely need to do this as the root user. Either log in or su to root.

After MySQL is installed you need to set the root password. To do this use the following commanding changing my_password to the password you want for the root user to access MySQL.
# mysqladmin -u root password ‘my_password’

Note: If the MySQL service is not running, you may have to start it by hand before trying to set the password. It should start automatically when the computer boots. The command to start MySQL is:
# /etc/rc.d/init.d/mysqld start

You can test the MySQL installation by doing the following:

# mysql mysql (connect to mysql database)
Enter Password:
mysql> SELECT * FROM user; (grab some data out of user table)

This should return the data in the user table. Type exit to leave.