TipsShell: créer archive avec tar
This commit is contained in:
parent
2306d11b5e
commit
cc13e6bec6
10
TipsShell.md
10
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
|
$ 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
|
## Droits
|
||||||
|
|
||||||
### Changer propriétaires owner et group selon actuels
|
### Changer propriétaires owner et group selon actuels
|
||||||
|
|
Loading…
Reference in a new issue