{"id":133,"date":"2005-08-14T02:34:14","date_gmt":"2005-08-14T02:34:14","guid":{"rendered":"http:\/\/www.bartbusschots.ie\/blog\/?p=133"},"modified":"2014-08-04T17:29:55","modified_gmt":"2014-08-04T17:29:55","slug":"colour-ls-on-os-x-103-and-higher","status":"publish","type":"post","link":"https:\/\/www.bartbusschots.ie\/s\/2005\/08\/14\/colour-ls-on-os-x-103-and-higher\/","title":{"rendered":"Colour ls on OS X 10.3 and Higher"},"content":{"rendered":"<p><\/p>\n<p>Many people seem to go to bizare lengths to get colour ls working on OS X and end up doing things like building their own ls from source or getting fink or darwinports to build a new ls for them. This is utterly pointless as the ls that comes with OS X 10.3 and higher has colour support built in!<\/p>\n<p>So, how do you enable it?<\/p>\n<p \/><\/p>\n<p>For some reason best known to themselves the clever people in Apple decided that the flag for colour on ls should not be <font face=\"courier new,courier,monospace\">&#8211;color<\/font> like it is on just about every other OS on the planet but instead the rather bizarre choice of <font face=\"courier new,courier,monospace\">-G<\/font>!<\/p>\n<p>So, to enable colour ls all you have to do is add the following to your <font face=\"courier new,courier,monospace\">.bash_profile<\/font> file:<\/p>\n<pre>alias ls=&amp;quot;ls -G&amp;quot;<\/pre>\n<p>If, like me, you like to have a black background on your terminal you may also want to set the colours so that folders are an easy to see yellow instead of an eye-hurting dark blue. To do this just add the following to your <font face=\"courier new,courier,monospace\">.bash_profile<\/font> too:<\/p>\n<pre>export LSCOLORS=dxfxcxdxbxegedabagacad<\/pre>\n<p>Don&#8217;t ask me what the letters means, all I know is it works!<\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many people seem to go to bizare lengths to get colour ls working on OS X and end up doing things like building their own ls from source or getting fink or darwinports to build a new ls for them. This is utterly pointless as the ls that comes with OS X 10.3 and higher [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[12],"tags":[26,465],"series":[],"class_list":["post-133","post","type-post","status-publish","format-standard","hentry","category-computers-tech","tag-os-x","tag-tip"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p7t9xK-29","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/posts\/133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/comments?post=133"}],"version-history":[{"count":1,"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/posts\/133\/revisions"}],"predecessor-version":[{"id":7559,"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/posts\/133\/revisions\/7559"}],"wp:attachment":[{"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/media?parent=133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/categories?post=133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/tags?post=133"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/series?post=133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}