![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| monitoring dirs | da-seot | Shell Programming and Scripting | 1 | 09-02-2007 11:55 PM |
| how to synchronize different dirs | reldb | Shell Programming and Scripting | 1 | 12-09-2006 05:08 PM |
| Making dirs in a partition | smo59 | UNIX for Dummies Questions & Answers | 2 | 06-22-2005 09:58 AM |
| Combining Two Dirs | Phobos | UNIX for Dummies Questions & Answers | 2 | 01-26-2005 06:13 PM |
| I need to ls all files in 4-6 deep dirs | gforty | UNIX for Dummies Questions & Answers | 4 | 09-18-2003 02:18 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
hi @all
question from an absolute beginner: I want directory listings to be displayed with different colors... what do I have to do and where can I find the settings? thx Last edited by tk876; 07-13-2001 at 08:41 AM. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Hi,
if you're using the bash shell you could create an alias for the "ls" command using the color option to differentiate file types. i.e. in your ~/.bash_profile file add alias ls='ls --color="always"' On my system the colours for different file types are a follows: executable files green archive files (.gz,.zip,etc,) red ascii files white jpgs,bmp files magenta symbolic links cyan directories blue I'm not sure if you can change the colours for different file types. Andy Hibbins |
|
#3
|
|||
|
|||
|
I've made the changes and it works fine...
but how can I define the colors for dirs, ascii files etc. thanks again thomas |
|
#4
|
|||
|
|||
|
To alter the colours for different file type you need to edit the dircolors config file.
On my system this is installed under /etc/DIR_COLORS you may also need to add the following to /etc/profile or ~/.bash_profile file eval `dircolors -sh /etc/DIR_COLORS` I don't need to add this to my /etc/profile ~/.bash_profile because it get's executed vi a script called color_ls.sh in the /etc/profile.d directory. Andy Hibbins |
|
#5
|
|||
|
|||
|
Hi
One more thing you can do is copy the /etc/DIR_COLORS file to your home directory as .dir_colors file and then edit it. The /etc/DIR_COLORS file have all the necessary information as well as the color codes to display your files or directories in diferrent color codes.
Hope This works |
|||
| Google The UNIX and Linux Forums |