Latest articles under General Unix category

Adding new lines to beginning of files.

I needed to do this when I want to debug my scripts for memory usage. My problem at that time was that as I include libraries, for some reasons PHP uses more memory even though I haven’t run a single code (other than require_once). So my idea is to add memory_get_usage() function call on the […]

Posted on May 5th, 2009 under General Unix, Quick Tips  •  No Comments

Customizing grep tool to exclude svn.

I mostly do programming by SSH-ing to development server. The code I’m working on are often managed by using SVN. There are many occasions when I need to search all source code to find a particular string. If you’ve worked on a source code that’s managed by SVN before, you’ll pretty soon notice that there […]

Posted on February 4th, 2009 under General Unix, Quick Tips  •  No Comments

Analyzing data in Unix using PHP CLI.

There are times when I need to quickly gather some quick data in a simple tab based or space based delimited file, most often log files. Also, the files that I work on are often huge, well according to my standard at least … about 1GB. The data that I need is often simple statistics […]

Posted on February 4th, 2009 under General Unix, PHP  •  No Comments