CharlyBr on Aug 11th, 2009Set Terminal tab title in Mac OS X
I wrote previously a how-to to set your iTerm tab title.
I finally found a tool to do the same thing with the default Mac OS X Terminal.
Check it out here, it works perfectly for me!
CharlyBr on Mar 13th, 2009Memory usage by group of processes
While monitoring a http/php server, I needed to do some statistics about php-cgi memory usage.
Playing with memory_limit in PHP, we wanted to know the average memory usage per php-cgi process. This is easily calculated with our best friend awk.
First, get the number of php running processes:
# ps aux | grep php-cgi | grep -v grep [...]
CharlyBr on Sep 11th, 2008The unix touch command
This post is a quick ref on the linux touch command. All the examples have been tested on Linux.
This command is used to update the access and modification times of files.
touch’s syntax
touch [option] file_name(s)
touch file1 file2 file3
Here some examples:
# touch /tmp/file
# ls -l /tmp/file
rw-r–r– 1 charlybr charlybr 0 Sep 10 16:13 /tmp/file
Update access and modification [...]
CharlyBr on Aug 5th, 2008sudo: port: command not found
On MacOSX, if you have installed macports with the package installer, you may encounter the sudo: port: command not found problem.
Macports binaries are installed in /opt/local/bin, so you just need to add this path to your PATH environment variable. Example with your user, add to your $HOME/.profile :
export PATH=$PATH:/opt/local/bin
You can source your profile file to [...]