According to many websites I found online the touch commands' -t argument accepts the time stamp in the following format:
[[CC]YY]MMDDhhmm[.ss] Here, CC: The first two digits of the year. YY: The last two digits of the year. MM: Month DD: Day of the month hh: Hour mm: Minute ss: Seconds For example:
$ touch -t 199901011200 test.txt Can I use the date or stat command to obtain the timestamp in the same format from a file or directory? By same format I mean the format above [[CC]YY]MMDDhhmm[.ss] By default the date command has a different output.
Note: I do not want to use touch reference -r command.