Operaciones de archivosCLI Manual
$touch
Create empty files or update file access and modification timestamps.
Sintaxis del comandoPOSIX Standard
touch [OPTIONS] FILE...Prueba en vivo en la terminal interactiva
Simulación del lado del cliente sin instalación y con respuesta inmediata.
bash — terminal
AST Sandbox (Free)
Descripción general y funcionamiento
`touch` is the standard tool for quickly creating empty placeholder files or updating the access and modification timestamps of existing files to the current system time.
Opciones y banderas comunes
| Flag / Option | Description |
|---|---|
| -a | Change only the access time. |
| -m | Change only the modification time. |
| -c | Do not create any files if they do not already exist. |
Ejemplos prácticos del mundo real
#1Create multiple new empty files
touch server.js config.json .env && ls -lCreates three empty files in the current folder.
Comandos de Linux relacionados
$findOperaciones de archivos
Busque archivos y directorios en una jerarquía según el nombre, tipo, tamaño o fecha de modificación.
$catOperaciones de archivos
Concatene e imprima el contenido de archivos en la salida estándar.
$mkdirOperaciones de archivos
Create new directories and folder hierarchies.
$rmOperaciones de archivos
Remove files or directories from the filesystem.
$cpOperaciones de archivos
Copy files and directories to a destination path.
$mvOperaciones de archivos
Move or rename files and directories.