Quantcast
Channel: Appending a current date from a variable to a filename - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 6

Answer by MelBurslan for Appending a current date from a variable to a filename

$
0
0

This:

find . -name The_Logs -atime -1 -type d -exec mv {} "The_Logs_${today}" \; &

should work. Although, it seems like you are using csh and my solution of removing the + sign may not work for you but it won't hurt to try. Enclosing your variable in {} curly brackets, is always a good idea to prevent unexpected variable expansions.


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>