Thursday, January 17, 2013

dircolors and dead symlinks


Thanks to a careful coworker, I realized that colored ls wasn't working as usual after an OS upgrade.  Namely, I was getting

$ ls -l
total 4
drwxrwsr-x 2 jkerl jkerl 4096 Sep 20 13:47 actual-dir
lrwxrwxrwx 1 jkerl jkerl   14 Sep 20 13:47 invalid-link -> no-such-target
lrwxrwxrwx 1 jkerl jkerl   10 Sep 20 13:47 valid-link -> actual-dir

rather than the expected

$ ls -l
total 4
drwxrwsr-x 2 jkerl jkerl 4096 Sep 20 13:47 actual-dir
lrwxrwxrwx 1 jkerl jkerl   14 Sep 20 13:47 invalid-link -> no-such-target
lrwxrwxrwx 1 jkerl jkerl   10 Sep 20 13:47 valid-link -> actual-dir

It turns out that I need an explicit eval $(dircolors)in my bash startup.

No comments:

Post a Comment