Tips tagged grep


Tip #892   Check memory and swap from command line

Want to check the amount of used, free and total memory and swap from the command line? This script displays memory and swap information. Fully posix compliant and should work with all 2.[2-6].* kernels .

Read more »


Tip #885   Random password generator.

Generate a random 8 character password containing a-z, A-Z and 0-9:

Read more »


Tip #878   Random xkcd comic

Displays a random xkcd comic. Requires ImageMagick.

Read more »


Tip #743   Grep for word in directory

I've often seen people using the find command on a directory to get all the files, then using these with grep to find files containing a particular word. This can however, be done better just using grep:

Read more »


Tip #554   Get your machines IP adress

You sometimes need your machines IP adress without relying on external sources; so here is the command to return your IP adress in one neat line.

Read more »


Tip #540   Command examples from shell-fu

The following isn't particularly pretty and should be considered a work in progress, but it's quite fun.

Get examples of ways a command can be used direct from shell-fu by adding the following alias:
Read more »


Tip #525   Find words in garbled text

Have a bunch of garbled text? Curious as to what words might be found inside? Try the following:

Read more »


Tip #510   iso2cd

My little "iso2cd" alias. Not clean, but handy. The Burning device will be auto detected.

example call:
iso2cd debian_lenny_final.iso

alias iso2cd="cdrecord -s dev=`cdrecord --devices 2>&1 | grep "\(rw\|dev=\)" | awk {'print $2'} | cut -f'2' -d'=' | head -n1` gracetime=1 driveropts=burnfree -dao -overburn -v" Read more »


Tip #499   Get real names of current users

The line below will give you the real names of the users currently logged in:

Read more »


Tip #468   Moved Trac and Subversion repositories to another machine/direct

CASE: You've relocated Subversion and Trac repositories to another machine/directories. You don't want to edit n+1 trac.ini files.

You have for example:



Change ALL trac.ini repository_dir settings:
Read more »