shell/基本脚本/通过反引号获得当前日期并生成唯一文件名.sh

6 lines
114 B
Bash
Raw Normal View History

2016-05-13 21:42:54 +08:00
#!/bin/bash
#copy the /usr/bin directory listing to a log file
today=`date +%y%m%d`
ls /usr/bin -al > log.$today