Shell scripts to Create a local dir base on the time.

#!/bin/bash

DATETIME=`date +%Y%m%d%H%M%S`
echo "datetime = $DATETIME"

mkdir $DATETIME

# cd $DATETIME

tar czf $DATETIME.tar.gz testdir

echo "completed."

 

posted @ 2015-08-28 15:40  bruceHuang  阅读(154)  评论(0编辑  收藏  举报