10 Linux commands you’ve Never Used

February 20, 2007

Nice blog entry detailing: pgrep, pstree, bc, split, nl, mkfifo, ldd, col, lsof, xmlwf

I also want to go on record that I HAVE used 5 of them.


cron Format (crontab)

April 14, 2006
* * * * * command to be executed
- - - - -
| | | | |
| | | | ----- day of week (0 - 6) (Sunday=0)
| | | ------- month (1 - 12)
| | --------- day of month (1 - 31)
| ----------- hour (0 - 23)
------------- min (0 - 59)

Show Solaris Configuration

April 10, 2006

Try these commands to get hardware info:

prtconf

vmstat

dmesg


Using Top Efficiently

March 30, 2006

Here is a link disussuing using TOP to create performance snapshots and other tips.


PERL for search and replace

March 16, 2006

You can use PERL as a stream editor to replace strings in one or more files in a directory like this:

perl -pi.orig -e ‘s/bgcolor=#ffffff/bgcolor=#000000/i’ *.html

The above replaces the color white with black in all html files in this directory and saves the original files with .orig extension.


Keep local environment when logging to remote servers

March 15, 2006

Use the script movein.sh from O’Reilley.

#!/bin/sh

if [ -z "$1" ]; then
echo "Usage: `basename $0` hostname"
exit
fi

cd ~/.skel
tar zhcf - . | ssh $1 "tar zpvxf -"

Read link for more info...


Generate SSL Certificate

March 15, 2006

Need OpenSSL for this –

openssl genrsa 512/1024 http://www.mysite.com.key
openssl req -new -key http://www.mysite.com.keyhttp://www.mysite.com.csr

Enter country, state, locality, org name, org unit, comon name, and email when asked. Note: Common Name is http://www.mysite.com.

openssl -req -x509 -key http://www.mysite.com.key -in http://www.mysite.com.csr http://www.mysite.com.crt