Showing posts with label timestamp. Show all posts
Showing posts with label timestamp. Show all posts

Thursday, March 13, 2014

Add time stamp to a file name from CLI

I often find myself in need to append a time stamp to a file name, but always forget the right command line parameters. Here's a quick reminder to myself on how to do just that.

mv filename filename-$(date '+%FT%T')
or
mv filename filename-$(date '+%s')

For those who want to know the details, here's the break down.