使用`date +%y%m%d` 


     `date +%Y%m%d_%H%M%S`



echo test > /opt/test`date +%y%m%d`.txt


echo nihao >/opt/test`date +%Y%m%d_%H%M%S`.log


Logo

更多推荐