Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This question already has an answer here:

Every once in a while I have to list some files (~20-50) in Bash on Linux || Mac.
These files are from four different file types.

ls nand2tetris/myChips/  
And16.**hdl** And16.**cmp**    And16.**tst**    And16.**out**  
....

Is it possible to colorize every file type in a different color, without changing the formatting? I still want to have the standard ls multi column, multi row output, not the kind of formatting that ls -l presents.

If the solution to the problem is a different technique from distribution to distribution, it would be nice to collect as many solutions as possible in this thread.

share|improve this question

marked as duplicate by Doug Harris, Dave M, Scott, Tog, KronoS Apr 17 '13 at 17:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Is this something that LS_COLORS (softwaregravy.wordpress.com/2010/10/16/ls-colors-for-mac) doesn't do? Reading your question it seems like all you need to to define colors for your file types in the LS_COLOR environment variable. I haven't personally noticed an ls which didn't support this for quite some time, but I'm sure there are variations that do not do this. –  SuperMagic Apr 15 '13 at 23:03
add comment

1 Answer 1

I have never been in need of do it, but you might want to read this, I think that it answers your question.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.