But then you need to call File.basename to strip /var/lib/alternatives/ from the returned results, not a huge win.