On Thu, Dec 31, 2009 at 07:28:05AM EST, Eric Blake wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > According to Chris Jones on 12/30/2009 11:26 PM: > > But pardon my ignorance, where exactly do you specify "LINK target"? > > In the source file that you feed to dircolors, so that dircolors can > generate the appropriate $LS_COLORS setting in your environment. Some > distros provide ~/.dir_colors which will be automatically used as the file > fed to dircolors during something like /etc/login, the default ~/.bashrc, > or other startup file, although that starts to get into distro specifics.
Ah, OK.. I had missed the dircolors command's -p switch. So I added the "LINK target" statement to my custom ~/.dircolors, and caused $LS_COLORS to be regenerated in a separate bash instance, and now I am getting this: ------------------------------------------------------------------------ $ ls -alh -F --full-time --color=always drwxr-xr-x 7 user user 4.0K 2009-12-31 [..] -0500 ./ drwxrwxrwt 27 root root 12K 2009-12-31 [..] -0500 ../ drwxr-xr-x 2 user user 4.0K 2009-12-31 [..] -0500 d1/ -rw-r--r-- 1 user user 0 2009-12-31 [..] -0500 f1 lrwxrwxrwx 1 user user 3 2009-12-31 [..] -0500 argetmld1: -> d1: lrwxrwxrwx 1 user user 2 2009-12-31 [..] -0500 lf1 -> f1 ------------------------------------------------------------------------ The 'ld1' soft link to directory 'd1' is prefixed by 'argetm'. Also both of the soft links are now white on black instead of the expected colors. Now where it gets really weird, is that I had recreated my test target directory /tmp/ldir, presumably after enabling 'LINK target' and when I revert to a shell where $LS_COLORS was gen'd without enabling 'LINK target', I have the following: ------------------------------------------------------------------------ $ ls -alh -F --full-time --color=always drwxr-xr-x 7 user user 4.0K 2009-12-31 [..] -0500 ./ drwxrwxrwt 27 root root 12K 2009-12-31 [..] -0500 ../ drwxr-xr-x 2 user user 4.0K 2009-12-31 [..] -0500 d1/ -rw-r--r-- 1 user user 0 2009-12-31 [..] -0500 f1 lrwxrwxrwx 1 user user 3 2009-12-31 [..] -0500 ld1: -> d1: lrwxrwxrwx 1 user user 2 2009-12-31 [..] -0500 lf1 -> f1 ------------------------------------------------------------------------ The 'ld1' soft link that I created is now listed as 'ld1:' with an appended colon (:) and it links to directory 'd1:' instead of 'd1'. Also, the '/' indicator is no longer appended to 'ld1 -> d1'. I proceeded to issue a 'file' command and this is the report: ------------------------------------------------------------------------ d1: directory f1: empty ld1:: broken symbolic link to `d1:' lf1: symbolic link to `f1' ------------------------------------------------------------------------ .. which makes sense, since my test directory's file name is 'd1'. Other commands such as rm, etc. require that I use the ld1: name in order to recognized the soft link - 'rm ld1' comes back with 'No such file or directory' message as (not) expected. Not that this unduly bothers me but I'm curious and I thought I should report it. This is a debian 'lenny' system, with per 'dpkg -l' the following installed: bash 3.2-4 The GNU Bourne Again SHell coreutils 6.10-6 The GNU core utilities Attaching my ~/.dircolors custom file to this message just in case. Thank you for your comments. CJ
# random 256 color dircolors for common extensions # 20091231 - Added LINK target - Chris Jones LINK target .h 38;5;78 .html 38;5;86 .png 38;5;190 .c 38;5;114 .gz 38;5;46 .py 38;5;190 .o 38;5;67 .cmd 38;5;225 .yaml 38;5;16 .mo 38;5;140 .jpg 38;5;63 .pyc 38;5;24 .svn-base 38;5;189 .sim 38;5;44 .so 38;5;122 .xml 38;5;209 .ko 38;5;219 .ids 38;5;178 .s 38;5;66 .stderr 38;5;37 .mp3 38;5;208 .desktop 38;5;109 .gif 38;5;218 .svgz 38;5;34 .hpp 38;5;186 .mod 38;5;143 .d 38;5;129 .txt 38;5;92 .fig 38;5;86 .list 38;5;227 .svg 38;5;31 .0 38;5;94 .md5sums 38;5;34 .php 38;5;142 .pl 38;5;204 .docbook 38;5;91 .rb 38;5;164 .la 38;5;76 .postinst 38;5;122 .postrm 38;5;194 .vim 38;5;152 .xpm 38;5;133 .dat 38;5;67 .jar 38;5;117 .js 38;5;29 .lit 38;5;172 .htm 38;5;72 .sml 38;5;80 .1 38;5;164 .map 38;5;103 .cpp 38;5;139 .sh 38;5;130 .pdf 38;5;52 .pm 38;5;172 .md5 38;5;107 .tmpl 38;5;85 .java 38;5;175 .ttf 38;5;18 .css 38;5;164 .eps 38;5;41 .a 38;5;81 .ics 38;5;108 .sig 38;5;208 .conf 38;5;223 .dll 38;5;151 .milk 38;5;115 .xm 38;5;112 .class 38;5;187 .shlibs 38;5;90 .pod 38;5;73 .properties 38;5;219 .sid 38;5;146 .deb 38;5;182 .ppd 38;5;194 .2 38;5;159 .order 38;5;51 .l 38;5;228 .ott 38;5;71 .debian 38;5;83 .lck 38;5;151 .4 38;5;142 .prerm 38;5;25 .po 38;5;108 .rar 38;5;231 .rc 38;5;97 .xsl 38;5;50 .dtd 38;5;228 .3 38;5;90 .ym 38;5;89 .rst 38;5;126 .conffiles 38;5;35 .i 38;5;144 .xpt 38;5;46 .freedb 38;5;40 .preinst 38;5;36 .xcu 38;5;196 .pas 38;5;83 .com 38;5;35 .doc 38;5;228 .cm 38;5;185 .entities 38;5;205 .afm 38;5;188 .kml 38;5;73 .m4 38;5;182 .ps 38;5;57 .ini 38;5;97 .country 38;5;154 .bz2 38;5;136 .xbm 38;5;26 .jps 38;5;57 .in 38;5;28 .cfg 38;5;183 .cmi 38;5;89 .idx 38;5;82 .diff 38;5;164 .bmp 38;5;160 .exp 38;5;47 .res 38;5;127 .zip 38;5;192 .tex 38;5;112 .al 38;5;125 .config 38;5;63 .ttf,v 38;5;116 .egg-info 38;5;189 .exe 38;5;172 .mf 38;5;65 .cmx 38;5;71 .mid 38;5;162 .utf8 38;5;98 .pat 38;5;80 .wav 38;5;209 .swg 38;5;20 .inf 38;5;31 .def 38;5;219 .mli 38;5;145 .5 38;5;174 .pc 38;5;75 .ico 38;5;29 .tcl 38;5;92 .ogg 38;5;141 .directory 38;5;58 .tga 38;5;89 .sol 38;5;132 .kmz 38;5;16 .qm 38;5;177 .protocol 38;5;215 .wma 38;5;193 .enc 38;5;210 .it 38;5;161 .svn 38;5;40 .ent 38;5;108 .6 38;5;184 .texi 38;5;54 .log 38;5;101 .src 38;5;148 .bm 38;5;209 .glade 38;5;198 .pem 38;5;211 .db 38;5;196 .gddb 38;5;87 .pfb 38;5;30 .odt 38;5;149 .gitignore 38;5;212 .rules 38;5;44 .nsf 38;5;103 .torrent 38;5;230 .sf 38;5;55 .rsa 38;5;30 .strings 38;5;190 .vtx 38;5;122 .rdf 38;5;215 .kss 38;5;30 .status 38;5;213 .bin 38;5;134 .crt 38;5;127 .schemas 38;5;92 .dts 38;5;120 .ld 38;5;120 .cf 38;5;36 .lang 38;5;188 .ui 38;5;227 .8 38;5;205 .awk 38;5;73 .scm 38;5;192 .avi 38;5;208 .boot 38;5;208 .asm 38;5;105 .ipp 38;5;104 .ahx 38;5;163 .py,v 38;5;198 .mk 38;5;98 .m 38;5;72 .xcs 38;5;96 .mldoc 38;5;93 .am 38;5;17 .c,v 38;5;91 .omf 38;5;191 .flv 38;5;61 .t 38;5;23 .erb 38;5;52 .ph 38;5;88 .upp 38;5;108 .nfont 38;5;101 .dic 38;5;228 .plist 38;5;212 .sc 38;5;36 .kdevtemplate 38;5;38 .as 39;5;112 .load 38;5;198 .icon 38;5;166 .mlb 38;5;212 .exsd 38;5;196 .debug 38;5;139 .st 38;5;58 .h-data 38;5;191 .sh,v 38;5;205 .sap 38;5;213 .10 38;5;153 .ggr 38;5;107 .fdi 38;5;171 .19 38;5;23 .tcc 38;5;52 .uo 38;5;31 .templates 38;5;89 .csv 38;5;27 .fw 38;5;43 .sample 38;5;139 .kcfg 38;5;127 .xsd 38;5;117 .lm 38;5;132 .bs 38;5;159 .til 38;5;129 .upd 38;5;164 .xba 38;5;43 .yml 38;5;206 .aux 38;5;173 .manifest 38;5;101 .gmo 38;5;65 .x 38;5;123 .hlp 38;5;174 .ml 38;5;176 .inc 38;5;118 .pgm 38;5;60 .swf 38;5;227 .0__35e10195dab3c99f 38;5;54 .au 38;5;72 .idc 38;5;62 .ex 38;5;147 .ots 38;5;191 .adapter 38;5;88 .ecore 38;5;194 .sql 38;5;73 .jsp 38;5;64 .nfo 38;5;216 .xul 38;5;45 .flac 38;5;190 .tbl 38;5;182 .sd 38;5;195 .vgz 38;5;136 .rd 38;5;206 .cache-2 38;5;209 .bat 38;5;23 .cnf 38;5;147 .m2i 38;5;79 .lng 38;5;82 .sys 38;5;115 .w64 38;5;66 .hints 38;5;158 .ilx64 38;5;167 .w32 38;5;24 .stats 38;5;49 .utf-8 38;5;132 .ilx 38;5;191 .dd 38;5;65 .dir 38;5;36 .xpm,v 38;5;86 .out 38;5;74 .alias 38;5;170 .data 38;5;65 .expected 38;5;39 .en 38;5;133 .cvsignore 38;5;53 .sym 38;5;107 .lo 38;5;65 .fon 38;5;109 .ver 38;5;231 .dsym 38;5;61 .0__0738eb9f132ed756 38;5;186 .lsm 38;5;79 .msg 38;5;172 .7 38;5;164 .s3m 38;5;190 .lds 38;5;116 .mpc 38;5;147 .em 38;5;150 .lua 38;5;160 .toc 38;5;98 .gym 38;5;76 .gpl 38;5;165 .dpatch 38;5;109 .06 38;5;212 .v200709261752 38;5;31 .cache 38;5;112 .xhtml 38;5;38 .ad 38;5;108 .old 38;5;228 .nse 38;5;40 .info 38;5;77 .sunwcch 38;5;93 .otp 38;5;135 .tst 38;5;179 .dll16 38;5;203 .pfm 38;5;42 .m3u 38;5;95 .adr 38;5;175 .cc 38;5;126 .cgi 38;5;172 .bash 38;5;174 .idl 38;5;64 .15 38;5;53 .ppm 38;5;79 .clilibs 38;5;20 .dot 38;5;183 .keyboardlayout 38;5;115 .proxylist 38;5;22 .time 38;5;196 .homepageurl 38;5;193 .reboot 38;5;231 .uilanguage 38;5;142 .utctime 38;5;96 .policy 38;5;127 .lsp 38;5;161 .zpts 38;5;124 .ax 38;5;61 .standbyled 38;5;158 .ldw 38;5;218 .hst 38;5;81 .portalurls 38;5;146 .l64 38;5;46 .vcproj 38;5;103 .soc 38;5;99 .el 38;5;77 .llx64 38;5;53 .c_shipped 38;5;141 .llx 38;5;223 .channeltable 38;5;64 .fun 38;5;181 .initialvolume 38;5;141 .sed 38;5;60 .template 38;5;65 .yaml 38;5;6 .sty 38;5;106
