You are not logged in.
Pages: 1
Ususally there is the file /etc/DIR_COLORS that is
used to customize ls --color=auto output by copying it to
~/.dir_colors, editing it and then running the command
eval `dircolors -b ~/.dir_colors`
or placing the same in .bashrc
But in Arch there is no such DIR_COLORS file.
Is this an omission, or is it not there intentionally?
Offline
here is mine:
# Configuration file for the color ls utility
# This file goes in the /etc directory, and must be world readable.
# You can copy this file to .dir_colors in your $HOME directory to override
# the system defaults.
# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
# off.
COLOR tty
# Extra command line options for ls go here.
# Basically these ones are:
# -F = show '/' for dirs, '*' for executables, etc.
# -T 0 = don't trust tab spacing when formatting ls output.
# -b = better support for special characters
OPTIONS -F -b -T 0
# Below, there should be one TERM entry for each termtype that is colorizable
TERM linux
TERM console
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM xterm
TERM vt100
# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
EIGHTBIT 1
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
NORMAL 00 # global default, although everything should be something.
FILE 00 # normal file
DIR 01;34 # directory
LINK 01;36 # symbolic link
FIFO 40;33 # pipe
SOCK 01;35 # socket
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 01;30
# This is for files with execute permission:
EXEC 01;32
# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')
.cmd 01;32 # executables (bright green)
.exe 01;32
.com 01;32
.btm 01;32
.bat 01;32
.tar 00;34 # archives or compressed (bright red)
.tgz 00;34
.arj 00;34
.taz 00;34
.lzh 00;34
.zip 00;34
.z 00;34
.Z 00;34
.gz 00;34
.bz2 00;34
.jpg 00;36 # image formats
.gif 00;36
.bmp 00;36
.xbm 00;36
.xpm 00;36
.tif 00;36
.tga 00;36
.png 00;36
.jpeg 00;36
.tiff 00;36
.xcf 00;36
.xcf.gz 00;36
.blend 00;36
.pcx 00;36
.ppm 00;36
.mp3 00;32
.mid 00;32
.wav 00;32
.au 00;32
.nes 00;31
.smc 00;31
.fig 00;31
.sfc 00;31
.smc.gz 00;31
.fig.gz 00;31
.sfc.gz 00;31
.mpg 00;35
.mpeg 00;35
.avi 00;35
.mov 00;35
.fli 00;35
.flc 00;35
it is one of the files i keep and use for any installation i do ... so i never wondered, if it is provided in the standard archlinux installation
The impossible missions are the only ones which succeed.
Offline
Thank you.
I didn't really need one since I also keep a copy of .dir_colors
from past distros. What I was wondering if /etc/DIR_COLORS
was missing when it should have been there.
Take a look -- do you have a /etc/DIR_COLORS file?
Offline
I don't
If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing. 1 Corinthians 13:2
Offline
I copied and pasted dp's file to /etc/DIR_COLORS, but nothing has changed. What am I doing wrong?
If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing. 1 Corinthians 13:2
Offline
Hmm.. /etc/profile does not do an eval `dircolors /etc/DIR_COLORS`. Once I added that in it worked. Cool
If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing. 1 Corinthians 13:2
Offline
Thank you.
I didn't really need one since I also keep a copy of .dir_colors
from past distros. What I was wondering if /etc/DIR_COLORS
was missing when it should have been there.Take a look -- do you have a /etc/DIR_COLORS file?
i just searched the filesystem and initscripts pkgs but didn't find /etc/DIR_COLORS ... also, i did'nt find the loading command in /etc/profile
it seems, that the standard archlinux do not have dircolors working per default
The impossible missions are the only ones which succeed.
Offline
It isn't included because it isn't needed by default. You can easily make a default DIR_COLORS file like this:
dircolors -p > /etc/DIR_COLORS
Offline
what is the file for anyway?
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
ack..nevermind.
*smacks forehead*
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
Anyone knwo why drives mounted with ntfs-3g shows all files and directories in green? Even though I have dir_colors defined.
Offline
Probably because they're executable, like the files in /bin - permissions issue.
Offline
Because executables are green.
Since windows files doesn't have any permission bit set, when you mount a windows partition, all the files use the default, ie 755 (you can see/change what permissions you mask via the umask command), with
1=executable
2=writable
4=readable
You can override this behaviour by passing to mount options like fmask, dmask, umask
For example
mount -t ntfs-3g -o fmask=0113,dmask=0002 /dev/sdbla1 /mnt/windows
This way files will be 664, directories 775
Last edited by carlocci (2008-03-20 13:27:49)
Offline
Thanks!
Offline
Pages: 1