Tips tagged grep


26

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 »

24

Tip #885   Random password generator.

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

Read more »

10

Tip #878   Random xkcd comic

Displays a random xkcd comic. Requires ImageMagick.

Read more »

10

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 »

2

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 »

4

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 »

3

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 »

5

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 »

1

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 »

2

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:
/repos/svn-myprojects/my-first-project
/repos/trac-myprojects/my-first-project

/repos/svn-myprojects/my-second-project
/repos/trac-myprojects/my-second-project

...etc...

Change ALL trac.ini repository_dir settings:

trac-mass-repodir-edit.sh:
Read more »