Accueil > Système > Append TimeStamp to file name

Append TimeStamp to file name

10/12/2019 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.

NAME

date -- display or set date and time

SYNOPSIS
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]

Samples:

Script to append date stamp to file:

Categories: Système Tags: ,
Les commentaires sont fermés.