#! /bin/bash
# Last edited on 2005-11-15 20:40:02 by stolfi

cmd=${0##*/}
usage="${cmd} {DIR...} "

# Executes "find {DIR...} -printf {FMT}" on the given directories, where
# {FMT} is a nice format.

while [ $# -gt 0 ]; do
  case "$1" in
    -* )
      error "unrecognized option $1" ;
      echo "usage: ${usage}" 1>&2 ; exit 1 ;;
    * ) break;;
  esac;
done

dirs=( $@ ); 

find ${dirs[@]} -type f -printf '%12s %10u %TY-%Tm-%Td-%TH:%TM:%TS %p\n'
find ${dirs[@]} -type l -printf '%12s %10u %TY-%Tm-%Td-%TH:%TM:%TS %p -> %l\n'

