Accueil > Système > Append TimeStamp to file name

Append TimeStamp to file name

19/12/2020 Categories: Système Tags: ,

I need to create a shell script that appends a timestamp to existing file. I mainly use Mac OS X for development. Wanted to create the same on Mac Terminal.

Here are some basics on date command.


date -- display or set date and time

date [-ju] [-r seconds] [-v [+|-]val[ymwdHMS]] ... [+output_fmt]
date [-jnu] [[[mm]dd]HH]MM[[cc]yy][.ss]
date [-jnu] -f input_fmt new_date [+output_fmt]
date [-d dst] [-t minutes_west]


Script to append date stamp to file:

Lire aussi:  How to run sudo command without a password on a Linux or Unix
Categories: Système Tags: ,
Les commentaires sont fermés.