Archive for the 'linux' Category

Using gnuplot to plot 3D graphs…

Tuesday, October 6th, 2009

…with a little help from awk…
For instance the following awk took the list of the 1st 1000 prime numbers and added a column for the difference between each of the prime numbers:
“awk ‘{ p = $1; getline; p = $1 – p; print NR” “p” “$1 }’ plist.txt > p8.txt”
Here’s the gnuplot file:
set dgrid3d 20,20
set [...]

Enabling SSL under Red Hat Enterprise Linux

Friday, May 29th, 2009

Create the keys – replace the O, OU & URL with your own data.  These are locally signed keys:
# openssl req -new -x509 -sha1 -newkey rsa:1024 \
> -nodes -keyout test.key -out test.crt \
> -subj ‘/O=NP/OU=Support/CN=www.example.com’
Generating a 1024 bit RSA private key
…………………………………….++++++
……………………….++++++
writing new private key to ‘test.key’
—–
Put the keys in their respective folders:
# ls -lrt
total 912
-rw-r–r– [...]

How to format a USB stick on Fedora Core 10 Linux

Friday, May 29th, 2009

Formatting a 16GB (Cruzer micro 16) USB Stick on Fedora 10.
Power up your Fedora machine and login then stick in USB stick.
Fedora 10 mounts USB device automatically.
Find the USB drives system name and mount point:
$ mount
~
/dev/sdb1 on /media/disk type vfat (rw,nosuid,nodev,uhelper=hal,shortname=lower,uid=500)
Unmount USB disk:
$ umount /media/disk
Found that fdisk /dev/sdb1 didn’t work as a normal user so [...]