https://www.jb51.net/article/78371.htm 参考文章


PARA_CNT=$#

TRASH_DIR="/tmp/.trash"

for i in "$*"

do

  STAMP=`date +%s`

  #fileName=`basename $(echo $i | /usr/bin/awk '{$1="";print}')`

  for filename in `echo $i | /usr/bin/awk '{$1="";print}'`

  do

    fileName=`basename $filename`

    /usr/bin/mv  $filename $TRASH_DIR/$fileName.$STAMP

  done

done