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>



Using Loggerhead with mod_wsgi|(0)

Here’s a post I wrote over on the Project Fondue Blog about our use of Loggerhead with mod_wsgi under Apache. Loggerhead is the rather nice branch viewer for bazaar branches as used on Launchpad.net.

If you’re not already subscribed to the Project Fondue blog feed then I can recommend it, as there should be some interesting posts coming out of there in the coming months (yes I’m unashamedly biased!).

Ubuntu: Turn off changing workspace with mouse wheel|(1)

I found the changing with the workspace with the mouse wheel really annoying. To disable it go to System => Preferences => CompizConfig (available if the compizconfig-settings-manager package is installed) and uncheck “Viewport Switcher” which is under the “Desktop” heading.

Photos on Flickr

© Copyright 2004-10 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 0.588s.