通过反引号获得当前日期并生成唯一文件名

5年以前  |  阅读数:582 次  |  编程语言:Shell 
#!/bin/bash
#copy the /usr/bin directory listing to a log file

today=`date +%y%m%d`
ls /usr/bin -al > log.$today

Copyright© 2013-2020

All Rights Reserved 京ICP备2023019179号-8