You are not logged in.

#1 2004-11-25 22:48:29

segmental
Member
Registered: 2004-11-07
Posts: 51

No /etc/DIR_COLORS file

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

#2 2004-11-25 22:58:09

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: No /etc/DIR_COLORS file

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

#3 2004-11-26 00:18:56

segmental
Member
Registered: 2004-11-07
Posts: 51

Re: No /etc/DIR_COLORS file

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

#4 2004-11-26 00:54:52

punkrockguy318
Member
From: New Jersey
Registered: 2004-02-15
Posts: 711
Website

Re: No /etc/DIR_COLORS file

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

#5 2004-11-26 00:57:05

punkrockguy318
Member
From: New Jersey
Registered: 2004-02-15
Posts: 711
Website

Re: No /etc/DIR_COLORS file

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

#6 2004-11-26 01:09:27

punkrockguy318
Member
From: New Jersey
Registered: 2004-02-15
Posts: 711
Website

Re: No /etc/DIR_COLORS file

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

#7 2004-11-26 14:51:38

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: No /etc/DIR_COLORS file

segmental wrote:

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

#8 2004-11-30 08:30:18

dpb
Member
From: Cyperspace?
Registered: 2004-04-11
Posts: 231

Re: No /etc/DIR_COLORS file

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

#9 2004-11-30 08:37:03

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: No /etc/DIR_COLORS file

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

#10 2004-11-30 08:38:21

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: No /etc/DIR_COLORS file

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

#11 2008-03-20 11:39:14

Aakko
Member
Registered: 2007-10-23
Posts: 65

Re: No /etc/DIR_COLORS file

Anyone knwo why drives mounted with ntfs-3g shows all files and directories in green? Even though I have dir_colors defined.

Offline

#12 2008-03-20 13:20:35

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: No /etc/DIR_COLORS file

Probably because they're executable, like the files in /bin - permissions issue.

Offline

#13 2008-03-20 13:27:12

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: No /etc/DIR_COLORS file

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

#14 2008-03-20 13:38:01

Aakko
Member
Registered: 2007-10-23
Posts: 65

Re: No /etc/DIR_COLORS file

Thanks!

Offline

Board footer

Powered by FluxBB