title: How can I detect whether a symlink is broken in Bash?
body: <p>I run <code>find</code> and iterate through the results with <code>[ \( -L $F \)  ]</code> to collect certain symbolic links. </p>
  
  <p>I am wondering if there is an easy way to determine if the link is broken (points to a non-existent file) in this scenario.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>FILES=`find /target/ | grep -v '\.disabled$' | sort`
  
  for F in $FILES; do
      if [ -L $F ]; then
          DO THINGS
      fi
  done
  </code></pre>