Common · Literature
Touch (command)
Standard Unix program used to change a file's access and modification timestamps
touch is a shell command that sets the modification timestamp of an existing file to be current – which on a Unix-based file system includes special files such as directories. If the input path does not specify an existing file, then it creates a new, regular file at the path.
From Wikipedia
touch is a shell command that sets the modification timestamp of an existing file to be current – which on a Unix-based file system includes special files such as directories. If the input path does not specify an existing file, then it creates a new, regular file at the path. The Single UNIX Specification (SUS) specifies that touch changes the access or modification timestamps, or both. The file is identified by file system path supplied as the sole argument. If the path does not specify a file, the command creates a file with access and modification timestamps as specified or by default to the current time. By default (no options specified), touching a file is equivalent to creating it with no content or if it exists, opening and saving it without any content changes to update the modification timestamp to be current. This convenience functionality is useful for a variety of scenarios including build and backup. The tools used in such scenarios typically ignore files that are older than a certain point of time. For example, make ignores a source code file that is older than the object file it is used to create. The command is often used to create a new file, so that can subsequently open it in an editor or to create a file required by an operation that does not require specific content. A touch command first appeared in Version 7 AT&T UNIX. Today, the command is available for many operating systems, including many Unix and Unix-like systems, Windows (via UnxUtils and Touch for Windows.), classic Mac OS, DOS, FreeDOS, DR DOS 6.0, KolibriOS, FLEX, AROS, OS-9, ReactOS, and IBM i. The version bundled in GNU Core Utilities was written by Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie, and Randy Smith.
Text: Wikipédia, CC BY-SA 4.0. ·
Related cards
-
★
Rm (Unix)
Basic UNIX command used to remove objects such as files and directories
-
★★
Diff
Standard UNIX utility for file comparison
-
★★★
Patch (computing)
Piece of software designed to update a computer program to fix or improve it
-
F★
Find (Unix)
Command-line utility
-
★
Tee (command)
Standard UNIX utility
-
★
Comm
Standard UNIX utility for comparing files
-
P★★
Path (computing)
General form of the name of a file or directory; resources can be represented by either absolute or relative paths
-
C★
Cat (Unix)
Unix utility that concatenates and lists files
-
★
date
Standard UNIX utility
-
★
Echo (command)
Command of DOS, OS/2, Microsoft Windows, Unix and Unix-like operating systems
-
★
Cd (command)
Command of Unix, DOS, OS/2, AmigaOS, Windows, and Linux operating systems
-
★★★
Sudo
Command on Unix systems to temporarily assume root privileges
-
★★
Command key
Computer key on Macintosh keyboards
-
D★★★
Dd (Unix)
Command on Unix and Unix-like operating systems
-
C★
Ctags
Create a tags file
-
★★
Dir (command)
Command of CP/M, DOS, OS/2, Singularity, Microsoft Windows, VMS, RT-11 and RSX-11 command line interpreters
-
M★
Mount (computing)
Activation of a filesystem instance so that the files it contains are available to applications
-
A★
Alias (command)
Command in various command line interpreters