title: Get last component of pathname in Common Lisp
body: <p>While I can build a pathname e.g.</p>
  
  <pre><code>(make-pathname :directory '(:RELATIVE "dir" "subdir" "subsubdir"))
  </code></pre>
  
  <p>how do I get back <code>subsubdir</code> from a pathname like this (assuming it is a directory)? I need to extract the last dir from a pathname, just as this Unix command does:</p>
  
  <pre><code>$ basename /usr/local/share/
  share
  </code></pre>