code: def size(args):
      
      from jcvi.utils.cbook import human_size
  
      p = OptionParser(size.__doc__)
      fp = sys.stdin
  
      results = []
      for link_name in fp:
          link_name = link_name.strip()
          if not op.islink(link_name):
              continue
  
          source = get_abs_path(link_name)
  
          link_name = op.basename(link_name)
          filesize = op.getsize(source)
          results.append((filesize, link_name))
  
      # sort by descending file size
      for filesize, link_name in sorted(results, reverse=True):
          filesize = human_size(filesize, a_kilobyte_is_1024_bytes=True)
          print("%10s\t%s" % (filesize, link_name), file=sys.stderr)
docs: find folder -type l | %prog size
  
      Get the size for all the paths that are pointed by the links