I am wondering how to change the time format when I am modifying a time with the touch command in the c shell.For example I need to usetouch -a -t 051512002015 file.txtThis will change the access time to May 15th 2015, 12:00.  What I want to do though is (notice year is first now)touch -a -t 201505151200 file.txtThis is how touch works in Linux.  I use UnxUtils on Windows, which I am almost sure uses c-shell touch.  I want the commands to be consistent.  Is it possible to change the c-shell touch command?
Change the time format for the touch command in BSD
command line;windows;bsd
This isn't about the shell, touch is an external program.There were historically two syntaxes for the date argument to touch:touch -t CCYYMMDDhhmm.SS    # CC or CCYY may be omitted; .SS may be omittedtouch MMDDhhmmYY            # YY may be omittedThe command appeared in Unix Seventh edition with no date argument. BSD versions acquired the -t option (with all the date components in descending order) somewhere around 4.4BSD. System V (e.g. SunOS 4.1.3) had the straight-date form with the year at the end. By the time of Single Unix v2 (based on POSIX:1992), the System V form was considered obsolescent, and it is no longer included in Single Unix v3 (POSIX:2001).I recommend using the standard (BSD) syntax in your script. On the legacy systems that require the BSD syntax, arrange to have a compatible touch. Several approaches are possible:Write a wrapper function that shuffles the arguments around if it detects that your script is running on a legacy system.Arrange to have a PATH that puts the standard-compliant directories ahead of the legacy directories.(You may get more specific advice if you post the exact legacy variants and versions you need to support.)