Here’s a quickie for printing the full relative path for all files in the current directory find . -type f -exec ls {} \; | cut -d’/’ -f2- Here’s an example of the output that you can expect:
Some webcrawlers (i.e., Bots) are important to the well-being of your website. Some of these include GoogleBot, msnbot, Yahoo! Slurp, etc. There are also a lot of bots out there that do nothing to help you, and actually can harm … Read more »
Are you tired of spambots submitting your “Contact Us” forms? Tired of spambots using your forms to “Tell a friend” with a spam link? Use Google’s reCAPTCHA service! It’s really easy to implement. Visit the google reCAPTCHA website to sign … Read more »
Do you own a website with a copyright tag that you’re tired of remembering to update every year? Here’s a very simple method of ensuring that your copyright is up-to-date, and you won’t have to worry about it ever again. … Read more »
MySQL has been eating my server alive for the past several months, and I never could determine the exact cause. I’m running MySQL in a VPS environment with 1GB of RAM with two dedicated AMD (Opteron) CPU cores. From a … Read more »
I like to use while loops to perform a command or group of commands indefinitely until I type ctrl-c to stop the loop. The while loop is useful when monitoring the output of the netstat command Alternatively, the above one-liner … Read more »
Over the years, I have found that most spam traffic comes from outside the United States. My websites are meant for English-speaking, Western Hemisphere type people, so why leave my server open to the rest of the world? Since I … Read more »
Posting this here because I like it. I use it to generate by firewall rules to block as much international traffic from my server as possible since it’s pretty clear that some Class A IP blocks don’t need to be … Read more »
IPTABLES TUTORIAL / HOWTO I. Definitions and similarities to ipchains II. Chain types and options III. Command pharmacy no prescription line examples With the release of the 2.4 kernel, everyone who was used to using ipchains to configure their firewall … Read more »
The for loop in a unix/linux shell is used to execute the same thing over and over again, or iteratively. Here are a few examples of simple for loop usage. The following loop goes through all files names *.jpg and … Read more »