touch (command)

Source: Wikipedia, the free encyclopedia.
touch

In

DR DOS, the AROS shell,[2] the Microware OS-9 shell,[3] and ReactOS.[4]
The command is also available for FreeDOS[5] and Microsoft Windows.[6]

Overview

In its default usage, it is the equivalent of creating or opening a file and saving it without any change to the file contents. touch avoids opening, saving, and closing the file. Instead it simply updates the dates associated with the file or directory. An updated access or modification date can be important for a variety of other programs such as backup utilities or the make command-line interface programming utility. Typically these types of programs are only concerned with files which have been created or modified after the program was last run. The touch command can also be useful for quickly creating files for programs or scripts that require a file with a specific name to exist for successful operation of the program, but do not require the file to have any specific content.

The

Single Unix Specification
(SUS) specifies that touch should change the access times, modification times, or both, for a file. The file is identified by a pathname supplied as a single argument. It also specifies that if the file identified does not exist, the file is created and the access and modification times are set as specified. If no new timestamps are specified, touch uses the current time.

History

A touch utility first appeared in

which?
]

The version of touch bundled in

coreutils was written by Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie, and Randy Smith.[7]

The command is available as a separate package for Microsoft Windows as part of the

DR DOS 6.0[10] and KolibriOS[11] include an implementation of the touch command. The touch command has also been ported to the IBM i operating system.[12]

See also

References

  1. ^ "FLEX 9.0 User's Manual" (PDF).
  2. ^ "AROS Research Operating System". aros.sourceforge.io.
  3. .
  4. ^ "reactos/reactos". GitHub.
  5. ^ "ibiblio.org FreeDOS Group -- Utilities". www.ibiblio.org.
  6. ^ "touch for Windows".
  7. ^ "touch(1): change file timestamps - Linux man page". linux.die.net.
  8. ^ "Native Win32 ports of some GNU utilities". unxutils.sourceforge.net.
  9. ^ "ibiblio.org FreeDOS Package -- touch (Unix-like)". www.ibiblio.org.
  10. ^ DR DOS 6.0 User Guide Optimisation and Configuration Tips
  11. ^ "Shell - KolibriOS wiki". wiki.kolibrios.org.
  12. ^ IBM. "IBM System i Version 7.2 Programming Qshell" (PDF). IBM. Retrieved 5 September 2020.

Further reading

  • McElhearn, Kirk (2006). The Mac OS X Command Line: Unix Under the Hood. .

External links