PowerShell_unix PowerShell is definitely gaining momentum in the windows scripting world but I still hear folks wanting to rely on Unix based tools to get their job done.  In this series of posts I’m going to look at converting some of the more popular Unix based tools to PowerShell.

touch

The Unix “touch” command is used to change a file’s access and modification timestamps.  It can also be used to create a new empty file.

The options to the Unix touch command are implemented with the following PowerShell parameters:

Unix PowerShell Description
FILE -filespec The files to modify.
-d -datetime Parse STRING and use it instead of current time.
-F -forward Modify the time by going forward SECONDS seconds.
-r -reference Use this file as a reference instead of the current time.
-m -only_modification Change only the modification time.
-a -only_access Change only the access time.