Grep is often most powerful when examining the output of other shell commands. This example searches the Linux processes from the ps command for apache.
The Linux sort – it’s incredibly fast, runs well on files larger than ram, and a must to master for any good sysadmin. Here are
A few examples on using the Linux find command to list out all files matching a file type. The find command is on just about
Finding out the version of redhat or centOS you’re running is easy, you simple cat out the release version file standard on any red hat
You can use PHP’s built in directory iterator (in php 5 or 7) to loop over a directory and perform operations on the files easily.
The uname shell command will print out in any Debian or RedHat variant like Ubuntu and Centos Linux much of the main system information, here
Needed a function to test if a date was valid in PHP. This function does that but it also requires an expected date format. Example
According to Datagenetics 10.71% of 4 digit passcodes are 1234. Data Genetics did some number crunching on ATM pin data, not sure how they got
If you want to see what processes are listening on what ports these you can use the linux command lsof and netstat. Below are a
This example of a upsert, an on duplicate key insert statement in MySQL. What it does is if the table zipcode_population has a unique index