linux-tutorial/codes/shell/示例脚本/基本脚本/通过反引号获得当前日期并生成唯一文件名.sh
2019-10-10 08:56:31 +08:00

7 lines
115 B
Bash

#!/bin/bash
#copy the /usr/bin directory listing to a log file
today=`date +%y%m%d`
ls /usr/bin -al > log.$today