I want to rename my file to the current timestamp.I know how to get the current timestamp(“date +%s”) but how can I pipe it to ‘mv’ command?
Here is Solutions:
We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.
Use something like this (
mv myfile myfile.$(date +%s)
mv myfile myfile.`date +%s`
if your shell doesn’t do the
Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂