The Computer Oracle

Mac OSX: Cannot color broken symlinks

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------

Take control of your privacy with Proton's trusted, Swiss-based, secure services.
Choose what you need and safeguard your digital life:
Mail: https://go.getproton.me/SH1CU
VPN: https://go.getproton.me/SH1DI
Password Manager: https://go.getproton.me/SH1DJ
Drive: https://go.getproton.me/SH1CT


Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Meditation

--

Chapters
00:00 Mac Osx: Cannot Color Broken Symlinks
00:37 Accepted Answer Score 7
00:52 Answer 2 Score 13
01:15 Thank you

--

Full question
https://superuser.com/questions/401243/m...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#macos #terminal #colors #bashprofile

#avk47



ANSWER 1

Score 13


Install Homebrew first.

  1. Install GNU coreutils: brew install coreutils
  2. Put the following in your ~/.bash_profile: eval $(gdircolors) alias ls="gls --color=auto"

Open a new shell, and broken links will be highlighted like on Linux.




ACCEPTED ANSWER

Score 7


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