Linux Shell Commands, Tips, Hacks, and Scripting




Benchmark Performance PDF Print E-mail

Benchmarking performance is something that every admin will need to do on a fairly regular basis.  My list of "go to" open source tools are as follows:

 

lmdd - lmbench : An excellent tool for raw disk speed metrics.
Good information about lmbench can be found here.

iozone : A very good tool with built-in charting.
Good information about iozone can be found here.

iperf : TCP/IP bandwidth benchmarking tool that is very configurable.

A listing of other Open Source tools can be found on this site.

 
Which gcc Compiler Do I Have? PDF Print E-mail

Depending on the system you are on, try one or more of these commands:

# locate ggc
# whereis gcc

# which gcc [Shows the version]

# rpm -qa | grep gcc [Only for rpm systems]

 
NFS: Remote Path has a Space PDF Print E-mail

If a remote file server has created a directory and put a space character in the path it can be a bummer to work configure the /etc/fstab config file - at least until you know how.

Attempting to mount /storage/directory with spaces/ will fail if you simply escape the space (with a backslash).

Just use '\40' in place of the space like this:

myserver:/storage/directory\40with\40spaces/ ...

 
vi Cheat Sheet Basic Commands PDF Print E-mail

Basic vi Commands in Cheat Sheet for Easy Reference

 

This command list is incomplete at the moment.  I'm still working out the most common and/or useful commands.

Most of the commands here will work anywhere that vi is loaded, but in my experience different flavors of UNIX have slightly different commands or keystrokes.  In particular, Solaris has had me using 'edit' or piping 'echo' strings into text files for easier additions.

I know that the following list works on Linux all over the place, at least these commands have worked on every Linux system I have worked on.

 

Read more...
 


Joomla SEF URLs by Artio
 
JOOMLA TEMPLATES Joomla Templates By JoomlaBear