Linux下以当前日期重命名文件

root@ubuntu:/home/test/file_2# mv 1 `date "+%Y-%m-%d-%H:%M:%S"`
root@ubuntu:/home/test/file_2# ls
1.c  2018-11-14-18:08:47 
root@ubuntu:/home/test/file_2# 

参考链接:
https://blog.csdn.net/freeman125384977/article/details/6687653

猜你喜欢

转载自blog.csdn.net/weixin_38184741/article/details/84099501