Unix at paulcarvill.com, the home of Paul Carvill on the web

link: paulcarvill on twitter

link: paulcarvill at flickr

paulcarvill.com

Hi, I'm Paul Carvill, I'm a web developer. I'm currently working as Technical Lead at LBi, Europe's largest digital agency.

I also like walking, cooking, Bollywood and rock 'n' roll.

Archive for the ‘Unix’ Category

Tree command for Mac OS X

Saturday, January 16th, 2010

This outputs a structured view of files and folder of the directory you execute it in:

find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'

e.g.

.
|____.git
| |____branches
| |____config
| |____description
| |____HEAD
| |____hooks
| | |____applypatch-msg.sample
| | |____commit-msg.sample
| | |____post-commit.sample
| | |____post-receive.sample
| | |____post-update.sample
| | |____pre-applypatch.sample
| | |____pre-commit.sample
| | |____pre-rebase.sample
| | |____prepare-commit-msg.sample
| | |____update.sample
| |____index
| |____info
| | |____exclude
| |____objects
| | |____info
| | |____pack
| |____refs
| | |____heads
| | |____tags
|____CHANGELOG.txt
|____COPYRIGHT.txt
|____cron.php
|____includes
| |____actions.inc
| |____batch.inc
| |____bootstrap.inc
| |____cache-install.inc
| |____cache.inc
| |____common.inc
| |____database.inc
| |____database.mysql-common.inc
| |____database.mysql.inc
| |____database.mysqli.inc
| |____database.pgsql.inc
| |____file.inc
| |____form.inc
| |____image.gd.inc
| |____image.inc
| |____install.inc
| |____install.mysql.inc
| |____install.mysqli.inc
| |____install.pgsql.inc
...

ls -R does something similar, but structured considerably differently.

Default PATH variable setting on Mac OS X

Tuesday, August 11th, 2009

Just in case your “friend” deletes his PATH variable and screws up his Terminal, stick this in ~/.bash_profile :

export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

Permission denied when accessing Sites directory on a Mac

Thursday, June 18th, 2009

Solution:

Open your Apache conf file:

sudo vi /private/etc/apache2/httpd.conf

…and relax the permissions somewhat by commenting out (with a #) or removing the ‘deny from all’ line:

<Directory />
        AllowOverride None
        Order Deny,Allow
#       Deny from all
</Directory>

With thanks to Damon Parker. See his site for an explanation of why you need to fix this in the first place.