Home Blog Portfolio Development Contact Us Recommends
Building One Application at a Time

Archive for the ‘Linux’ Category

Plesk, vhost.conf, and Sub-Domains

Friday, March 12th, 2010

If anyone that has server configuration knowledge and has tried to configure a server with Plesk installed, they probably had to go through a learning curve to get everything strait. Here is what I learned: (more…)

A Really Handy “FIND” Search Function

Monday, August 31st, 2009

I really needed to get a list of files, recursively, from a rather large directory intensive web site sorted by the last modified date and I did not want to go through each directory searching for them by hand.  The idea was to get the last modified file in hope that I would find a file that contained a critical update for another web site with the same program.  After a couple hours of searching for and understanding the syntax involved, here is the Linux command that did the job.

find ./ -name “*.php” -type f -printf “%TY-%Tm-%Td %TT %h/%f \n” | sort -rb | head -5

So what we are doing is trying to find a file with a .php extension searching from the current directory we are in, recursively.  We are telling the command that it is a file type and sorting it in reverse order to show 5 in the list of files returned.  We would like to get the results in a formatted way, so we are displaying the date first then the file name.  Example output:

2009-08-31 15:14:38 ./admin/functions/email.php
2009-06-07 13:08:20 ./admin/config.php
2009-03-07 09:28:03 ./admin/inc.php

That’s it. Hope someone finds this useful!

Using Pages to Hold Content for a Wordpress Template Page

Thursday, April 9th, 2009

I have been using pages to hold content in Wordpress templates for some time now.  The problem I have with it is that every time I need to perform such an action I cannot remember how to do it nor where I have done it before. (more…)

Chroot users in Fedora 9, no ssh, sftp, Jail

Monday, September 22nd, 2008

Lets say you have a developer that needs to work on one of the sites that you are hosting on your web server in your basement and you don’t want them to have free range to everything on the box.  Another piece of this is you really don’t want the user to have SSH access either.  (more…)