Compare files ignoring a field or column using Process Substitution
Using Process Substitution method, two streams of data can be used with `diff`. This allows pre-processing of files to drop some part (e.g. a column/record per ...
Using Process Substitution method, two streams of data can be used with `diff`. This allows pre-processing of files to drop some part (e.g. a column/record per ...
Add name of outgoing/relaying mailhost as `relayhost` in `/etc/postfix/main.cf` and restart postfix.
`ps -eo pcpu,pid,ruser,args | sort -r -k1 | less` provides in reverse sort order the `pid` that is taking up most of `pcpu` and the `ruser` (real user) with `ar...
Using dd, the file can be sliced and then grep can be applied for the pattern on that slice.
Using a combination of patterns with "-o" and/or -"a" (which OR the pattern or AND the pattern) in find command, one can search for various patterns or combine ...
Using -size and -exec flags of find command, one can easily find when the logfile has grown above the threshold and move it to another name in one shot.
Many Unix variants (including latest Solaris 11 Express) use a version of find that first looks for current working directory. And if that current working direc...
Using sort and uniq commands, one can count number of recurrences of records in a file.
Using shell builtin exec, ouput and error output streams of a script can be redirected just like ">" or ">>" operators.
Linux provides a utility called runlevel but "who -r" is a portable solution which is available across various Unixes.