How to create timestamp in linux ? For creating backup folder ?

Use this :

date  +%d-%m-%Y-%H%M%S

Assign to a variable and use mkdir

BK_TIME=date +%d-%m-%Y-%H%M%S

mkdir BK_TIME

 

 

Leave a comment