
Problem You want to generate a self-signed certificate?Encrypt a message with triple desView base 64 encoded dataGenerate and use random dataTest ciphersMonitor...
Problem You want to send an attachment, from UNIX command line or from within a shell script Solution uuencode works a treat with Solaris. Not sure on...
Problem You want to make some backups with tar. Solution tar is very functional and has many uses. Example If you are lucky enough to have GNU tar (tar...
Problem You want to forward all traffic from a port on your box, to another host/port combination. Solution The command in the example will port forward,...
Problem You want to receive an email upon cron job failure. Solution The example code can be wrapped around a normal cronjob, to send an email if the cron...
Problem You want to display line lengths – then average line length of file. Solution Snip using awk – see example. Example awk ' { thislen=length($0);...
Problem Had to find out how to allow a range with iptables recently, whilst setting up Samba and NFS. Solution Always take a backup first, then vi /etc/sysconfig/iptables....
Problem You want to encrypt some text, using the tripleDES Cipher. Solution Openssl is a beautiful command, that performs many functions. See example....
Problem You want to generate a self-signed certificate, for use with a web server.This will allow you to communicate with your web server over HTTPS, effectively...
Problem You want to be sure that your web site is only serving 128 bits! Solution Use openssl s_client – with specific ciphers – see the example....
Problem You want to automate checking expiry of SSL (HTTPS) Certificate expiry. Solution The link to the script is displayed in examples. It connects to...
Problem You want to compare two cacerts java certificate stores.Say comparing development server against prod, to ensure they both have same certs stored...
Problem You want to generate 512 bytes of random data, using UNIX dd (disk to disk) command. Solution Using /dev/random blocks waiting for truly random...
Problem You want to loop around a number of times and perform an action. Solution Being able to loop around a given number of times, fully utilizes the...
Problem Ever wanted to produce columns of output, rather than your output spilling off the screen. Solution Useful command for this is paste, see example...
Problem You want to loop a number of times in UNIX. Solution Being able to loop around a given number of times, fully utilizes the power of UNIX. See the...
Problem You want to check a variable for a given pattern. Solution This is my personal favorite way to check for values in vars. See examples. Example...
Problem When you exit your shell, the processes you’ve kicked off die. Solution If you start a process with nohop (ignore the hup signal), it will...
Problem You want to perform some arithmetic with UNIX. Solution The binary calculator, installed with pretty much all version of UNIX, can be used for...
Problem Started using vi probably 13 years ago and ever so often, still learn new tricks with it! 🙂Some of my favorites are: turning on control characters;...
Problem Spent many hours debug my code on elizaclaire.darlingranges.com.I kept wondering why, whenever I updated the code – it did not get reflect...
Problem Spent many further hours debug my code on elizaclaire.darlingranges.com.None of my javascript functions worked, in the resulting sub-request. Tried...
Problem Ever needed to print out one column with awk, but do not know the field number? Solution Here I’m running df and looking for a field with...
Problem Ever wanted to display a line number, with each matching record from awk. Useful as a way of counting the number of matching lines too. Solution...
Problem Need to send an email from UNIX command line, that contains HTML content? Solution Most useful when generating statistics, etc – just spin...
Problem You need to debug a shell script. Solution Most shells (zsh, ksh, bash …) can either run with a minus x (-x) option or by specifying set...
Problem Sometimes you want to list all processes that have been initiated by cron. Solution To do this you first need to know the Process ID (PID) of the...
Problem You want to ascertain how long your script takes to run, displaying thousands of seconds and including CPU utilization. Solution Just use the time...
Problem You want to display processes, commands within the process tree. Solution There are a number of ways to search the process tree.Here are a few:Show...
Problem You want to create and use an UNIX FIFO. Solution FIFO means first in, first out.To create a FIFO (also called a named pipe), UNIX supplies the...
SEARCH