Hi, I am using putty and trying to rename a file name with the current timestamp ... I used the following command to rename files and by date mv abc.log $ (date +% F) prod.txt
renames commands above but cannot rename with time, it gives an output like: 2014-05-12prodabc.log
And the following command is abc.log $ (date +% y) $ (date +% m) $ (date +% d) abcprod.log
gives an output like: 140512abc.log
Actually, my requirement is as follows.
rename abc.log to abc-current timestamp.log eg abc.log become abc-12-05-2014-17:31.log then create new file abc.log
Please help, thank you all in advance.
source share