Muffinresearch Labs by Stuart Colville

Mac OSX tip: ls command color output | Comments (2)

Posted in Code, Linux/Unix on 1st April 2008, 9:25 am by Stuart

If you have OSX tiger simply grab the fileutils from fink with

fink install fileutils

Then add the following to your .profile:

export LS_OPTIONS='--color=auto'

eval "`/sw/bin/dircolors`"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -lah'
alias l='ls $LS_OPTIONS -lA'

In leopard it’s even easier; simply use the -G switch:

alias ls='ls -G'
alias ll='ls -lahG'
alias l='ls -laG'

Completely non-essential but I find it quite handy to be able to tell apart dirs and files by colour.

Post Tools

Comments: Add yours

1. On April 1st, 2008 at 9:38 am Robert Nyman said:

Any way to get folders first and then files in Finder, as opposed to name being the only sorting parameter?

2. On April 2nd, 2008 at 1:44 pm James Broad said:

Robert, this may be what your looking for:

ls -la | sort -nr +1







XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



Standalone mac battery charger|(0)

Got a spare mac battery? I’ve often wondered why up until now no-one’s produced a standalone charger so that you can charge batteries without having to plug them into the mac. Fortunately Fastmac.com have produced a standalone charger that allows you to do just that. and it’s compatible with iBooks, Powerbooks, macbooks and Macbook Pros. It’s also 110/200v. Exactly what I was looking for!

Django Admin Ominigraffle Stencil|(0)

Colleague Alex Lee has created a nice stencil for omingraffle with the Django Admin UI components, perfect for wireframing customised admin screens. For more details and to download the stencil see Alex’s Blog csensedesign.co.uk

Photos on Flickr

© Copyright 2004-08 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by 1&1 This page was baked in 0.706s.