Name

dircolors

Synopsis

    dircolors [options] [file]

Set the color options for ls by changing the LS_COLORS environment variable. If you specify a file, dircolors reads it to determine which colors to use. Otherwise, it uses a default set of colors.

Options

-b, --sh, --bourne-shell

Use the Bourne shell syntax when setting the LS_COLORS variable.

-c, --csh, --c-shell

Use csh (C shell) syntax when setting the LS_COLORS variable.

-p, --print-database

Display the default colors. You can copy this information into a file and change it to suit your preferences, and then run the program with the file as its argument to set the colors to your new values.

Example

In your .profile, you might have this:

    eval 'dircolors'

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.