Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

i'm on freeBSD and trying to colorize ls output, so i've added

alias ls        ls -lhG
setenv LSCOLORS gxfxcxdxbxegedabagacad

to my .cshrc

and it works. but what i really want to - is to be able to colorize (for example) *.pl and *.php files different ways to quicly distiguish it.

Can i modify LSCOLORS some way to colorize files dependong on their name?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

No. You can't, not with the default ls that ships with FreeBSD.

You can, however, install the gnuls port, which will give you /usr/local/bin/gnuls, which can be set to display colors of files by extension.

share|improve this answer
    
thanks! will try this port! –  k102 Dec 12 '11 at 4:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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