diff --git a/TipsShell.md b/TipsShell.md index 34a365a5..5d0a3411 100644 --- a/TipsShell.md +++ b/TipsShell.md @@ -271,6 +271,16 @@ Connaître la taille totale des derniers fichiers copiés : $ find /path/ -type f -mtime -1 -printf "'%p' " | xargs du -ch ~~~ +### Archiver + +~~~ { .bash } +tar --create --file archive.tar --verbose -- directory +tar --create --file archive.tar --exclude='directory/subdir' --verbose -- directory +tar --create --file archive.tar --exclude='directory/subdir/*.mp3' --verbose -- directory +~~~ + +> Lorsqu'on exclut un répertoire, il ne faut pas mettre de `/` à la fin du chemin. + ## Droits ### Changer propriétaires owner et group selon actuels