dircolors
dircolors [OPTION]... [FILE]
Output commands to set the LS_COLORS environment variable.
Options
--sh
,--bourne-shell
,-b
-
output Bourne shell code to set LS_COLORS
--csh
,--c-shell
,-c
-
output C shell code to set LS_COLORS
--print-database
,-p
-
print the byte counts
--print-ls-colors
-
output fully escaped colors for display
If FILE is specified, read it to determine which colors to use for which file types and extensions. Otherwise, a precompiled database is used. For details on the format of these files, run 'dircolors --print-database'
Examples
Output commands to set LS_COLOR using default colors:
dircolors
Display each filetype with the color they would appear in ls
:
dircolors --print-ls-colors
Output commands to set LS_COLOR using colors from a file:
dircolors {{path/to/file}}
Output commands for Bourne shell:
dircolors --bourne-shell
Output commands for C shell:
dircolors --c-shell
View the default colors for file types and extensions:
dircolors --print-data
The examples are provided by the tldr-pages project under the CC BY 4.0 License.
Please note that, as uutils is a work in progress, some examples might fail.