# How to color types of files in xterm



## lrpr (Mar 1, 2009)

Hello,

I am Max OS X 10.5.6 and the xterm in x11. I have two questions:
1. How can I color the border in the xterm? I tried using the -bd option but nothing happened.
2. I would to have different colors corresponding for different files. For example, a directory to have a different color than a file and so on. How do I do this? And where do I write this setting to make it a default?

Thanks!


----------



## ElDiabloConCaca (Mar 1, 2009)

As for number 2, I alias "ls" to "ls -laFG".  The 'G' option colors files differently from folders, differently from executables, etc.  This is for the bash shell, by the way, but there are similar options for csh/tcsh.

You can put this alias in your .bash_profile or .bashrc file (for the bash shell).


----------



## macbri (Mar 12, 2009)

(1) The xterm doesn't have a border really, just a single line (apart from the title bar anyway).  I don't think you can colour this single-pixel "edge" of the window, although if you add a scrollbar ("xterm -sb -rightbar") and then colour the border, you'll see a single line of that colour inside the scrollbar:


```
xterm -sb -rightbar -bd green
```
(2) As ElDiablo says above.  Or, just "export CLICOLOR=1" and you don't need to alias "ls" to anything.


----------

