touch
touch [OPCIÓN]... [ARCHIVO]...
Actualizar los tiempos de acceso y modificación de cada ARCHIVO al tiempo actual.
Options
--help-
Print help information.
-a-
change only the access time
-t <STAMP>-
use [[CC]YY]MMDDhhmm[.ss] instead of the current time
--date=<STRING>,-d <STRING>-
parse argument and use it instead of current time
-f-
(ignored)
-m-
change only the modification time
--no-create,-c-
do not create any files
--no-dereference,-h-
affect each symbolic link instead of any referenced file (only for systems that can change the timestamps of a symlink)
--reference=<FILE>,-r <FILE>-
use this file’s times instead of the current time
--time=<WORD>-
change only the specified time: “access”, “atime”, or “use” are equivalent to -a; “modify” or “mtime” are equivalent to -m
Examples
Crea los archivos especificados:
touch {{ruta/al/archivo1 ruta/al/archivo2 ...}}
Establece los tiempos de [a]cceso o [m]odificación al momento actual y no [c]rea un archivo si este no existe:
touch {{[-c|--no-create]}} -{{a|m}} {{ruta/al/archivo1 ruta/al/archivo2 ...}}
Establece los [t]iempos de un archivo a un valor específico y no [c]rea el archivo si no existe:
touch {{[-c|--no-create]}} -t {{YYYYMMDDHHMM.SS}} {{ruta/al/archivo1 ruta/al/archivo2 ...}}
Usa los tiempos de un archivo de [r]eferencia para establecer los tiempos en otro archivo y no [c]rea el archivo si no existe:
touch {{[-c|--no-create]}} {{[-r|--reference]}} {{ruta/al/archivo/de/referencia}} {{ruta/al/archivo1 ruta/al/archivo2 ...}}
The examples are provided by the tldr-pages project under the CC BY 4.0 License.
Please note that, as uutils is a work in progress, some examples might fail.