Wednesday 20 March 2019

macos - Mac OSX: Cannot color broken symlinks


On my linux machine, you can tell intact symlinks from broken ones, because broken ones are colored red. I've tried to set this up on my mac by adding some configurations to PSCOLORS in my .bash_profile, but so far nothing has worked. I've managed to get the coloring to tell apart directories, files, executables, and symlinks. However, the broken symlinks are not a different color than intact symlinks. Searching around on google hasn't rendered any promising results. Ideas? Tricks?



Answer



I don't think it's possible – the man page for ls doesn't list a color slot for broken symlinks.


Here's a handy find one-liner for finding broken symlinks:


find -L . -type l -ls

No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...