How to rename all files in a directory adding unix current date prefix
1 answer
If I understand your question, you can use $(date +%s)
command substitution syntax to get the output of a command (and I suggest quotes) like
for i in *; do mv "$i" "$(date +%s)_$i"; done
+7
source to share