# touch

* [touch](https://manpages.debian.org/bookworm/manpages-es/touch.1.es.html) - Crear fichero vacío.

```bash
$ touch document.txt
```

Aunque el propósito original de este comando es actualizar la fecha de acceso y modificación del fichero a la hora actual, se usa para crear ficheros vacíos si no existen. ¿Con qué propósito hacer esto? Supongamos que necesitamos crear varios ficheros para luego comenzar a editarlos, entonces podríamos hacer lo siguiente: `touch doc1 doc2 doc3`. Ahora, al ejecutar `ls` vemos estos ficheros.

{% hint style="info" %}
**Formato**

En GNU/Linux, los ficheros pueden tener o no tener un formato definido (extensión) como lo son `.txt` `.php` `.html` `.css` `.js` etc... sin que esto nos ocasione un problema al momento de editarlos o visualizarlos.
{% endhint %}

Otra forma de crear varios ficheros al mismo tiempo, que tengan el mismo nombre y que finalicen con un número, se puede hacer así: `touch file{1..5}`. En este ejemplo se crean 5 ficheros enumerados del 1 al 5.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yejokjanan.gitbook.io/aprendiendo-gnulinux/comandos-basicos/ficheros-y-directorios/touch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
