Tag Archives: bash

Small shell script to colorize Apache logs (for phpBB3 forum)

How to make a small shell script to improve readibility of Apache logs output?

I created one some time ago for myself because raw Apache output generated too much output.

This is a script to quickly see what users do in phpBB3 forum board.

Extremely simple – only tail and awk used!

Read more ...

How to kill linux process when he take too many memory?


I don’t know why, but flash process in my fedora distro in opera browser still reserve more memory. More and more… Most, as i observed is over 1.7 GB.

So i killed manuall this process (he will be respawned when browser reload page). But this situation are repeated. Again and again. It’s boring.

How to kill it automatically?

Read more ...

How to make an shell alert service – and sent a mail?

logo2How to send a notification from Your server to mailbox?
How to create alerting service what will send a mail to us?
Sometime we need to be noticed about miscelaneous situations in our linux/unix systems.
Let’s make a small notice program – i need to been warned when amount of files in specified directory exceed defined value.

Read more ...

How to find files with specified string… string in bytes (hex values)?

Zaznaczenie_005It’s easy to find files containing specified text string – using grep.
But if we must find files with part of a binary string?
Let’s try…





Read more ...

My flash pendrive is damaged! How to recover data using ddrescue?

pendriveIn march 2013 my flash pendrive has gone crazy. This is an unwanted situation what can happen to everyone. I have backup, but old, from 2-3 months ago. Pendrive is dead in specified way. He shown their presence not in all time, for second-third mount.

I not remember all steps in this situation (6 months past) but i found some notes writed myself  of my recovery process, so i try to explain what i do to recover data from my usb stick.

Read more ...