1. 程式人生 > >Linux下以當前日期重新命名檔案

Linux下以當前日期重新命名檔案

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

參考連結:
https://blog.csdn.net/freeman125384977/article/details/6687653