title: "ln -sf" does not overwrite a symlink to a directory
body: <pre><code>ln -sf
  </code></pre>
  
  <p>does not overwrite a given symlink to a directory.</p>
  
  <p>See e.g.</p>
  
  <pre><code>% ls -ld program*        
  drwxr-xr-x 22 b users 4096 Nov 25 14:33 program
  drwxr-xr-x 22 b users 4096 Nov 25 14:29 program-201611181546
  -rw-r--r--  1 b users    0 Nov 25 14:34 program-current
  % ln -fs program-201611181546 program-current
  % ls -ld program*                            
  drwxr-xr-x 22 b users 4096 Nov 25 14:33 program
  drwxr-xr-x 22 b users 4096 Nov 25 14:29 program-201611181546
  lrwxrwxrwx  1 b users   18 Nov 25 14:34 program-current -&gt; program-201611181546
  % ln -fs program program-current 
  % ls -ld program*               
  drwxr-xr-x 22 b users 4096 Nov 25 14:33 program
  drwxr-xr-x 22 b users 4096 Nov 25 14:34 program-201611181546
  lrwxrwxrwx  1 b users   18 Nov 25 14:34 program-current -&gt; program-201611181546
  </code></pre>
  
  <p>I would have expected</p>
  
  <pre><code>lrwxrwxrwx  1 b users   18 Nov 25 14:34 program-current -&gt; program
  </code></pre>
  
  <p>As workaround I can explicitly unlink.</p>
  
  <pre><code>% unlink program-current 
  % ls -ld program*         
  drwxr-xr-x 22 b users 4096 Nov 25 14:33 program
  drwxr-xr-x 22 b users 4096 Nov 25 14:34 program-201611181546
  % ln -fs program program-current
  % ls -ld program*               
  drwxr-xr-x 22 b users 4096 Nov 25 14:33 program
  drwxr-xr-x 22 b users 4096 Nov 25 14:34 program-201611181546
  lrwxrwxrwx  1 b users    5 Nov 25 14:35 program-current -&gt; program
  </code></pre>
  
  <p>But I would prefer <code>ln</code> doing the job.</p>
  
  <p>Is this possible? How?</p>