Files
tldr/pages.fr/common/tar.md
2021-02-13 00:53:30 -03:00

34 lines
902 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# tar
> Utilitaire d'archivage.
> Souvent combiné avec une méthode de compression, telle que gzip ou bzip2.
> Plus d'informations : <https://www.gnu.org/software/tar>.
- Créer une archive à partir de fichiers :
`tar cf {{cible.tar}} {{fichier1 fichier2 fichier3}}`
- Créer une archive gzip :
`tar czf {{cible.tar.gz}} {{fichier1 fichier2 fichier3}}`
- Extraie une archive (compressée) dans le dossier courant :
`tar xf {{source.tar[.gz|.bz2|.xz]}}`
- Extraie une archive dans un dossier cible :
`tar xf {{source.tar}} -C {{dossier}}`
- Créer une archive compressée, en utilisant le suffixe de l'archive pour déterminer le programme de compression :
`tar caf {{cible.tar.xz}} {{fichier1 fichier2 fichier3}}`
- Lister le contenu d'une archive tar :
`tar tvf {{source.tar}}`
- Extraire les fichiers correspondant au motif :
`tar xf {{source.tar}} --wildcards "{{*.html}}"`