# Commandes bash

## Template de Documents

Pour avoir la possibilité de créer un nouveau document par un clic droit sous Ubuntu :&#x20;

```bash
touch `xdg-user-dir TEMPLATES`/Document.txt
```

## Rechercher un fichier

* `find /home -name  <fichier>`
* `locate <fichier>`

## Modifier un fichier

* Ajouter une ligne :&#x20;

```bash
echo "1 ligne de plus" >> texte.txt
```

* Supprimer des lignes (ici supprime seulement la sortie)

  * `sed '3d' mon_fichier.txt`
  * `sed '$d' mon_fichier.txt`

  **Ajouter l'option** `-i` pour modifier effectivement le fichier !

  **Filtrer la sortie**

  * Commande `tail` : affiche que les liges de la fin :&#x20;
* Exemple : `tail -3 .bashrc` : affiche les 3 dernières lignes


---

# 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://developer.webrush.fr/terminal/commandes.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.
