Outils pour utilisateurs

Outils du site


welcome:zfs:small_tricks

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
welcome:zfs:small_tricks [2021/08/27 15:45]
127.0.0.1 modification externe
welcome:zfs:small_tricks [2023/05/29 17:31] (Version actuelle)
arnaud [Destroy many snapshots]
Ligne 15: Ligne 15:
 You may find something like this a little simpler You may find something like this a little simpler
  
-zfs list -t snapshot -o name | grep ^tank@Auto | tac | tail -n +16 | xargs -n 1 zfs destroy -r+zfs list -t snapshot -o name | grep '^tank@Auto| tac | tail -n +16 | xargs -n 1 zfs destroy -r
  
     output the list of snapshot (names only) with zfs list -t snaphot -o name     output the list of snapshot (names only) with zfs list -t snaphot -o name
Ligne 27: Ligne 27:
 or sort in reverse order of creation or sort in reverse order of creation
  
-zfs list -t snapshot -o name -S creation | grep ^tank@Auto | tail -n +16 | xargs -n 1 zfs destroy -vr+zfs list -t snapshot -o name -S creation | grep '^tank@Auto| tail -n +16 | xargs -n 1 zfs destroy -vr
  
 Test it with ...|xargs -n 1 echo </code> Test it with ...|xargs -n 1 echo </code>
 +
 +<note tip>the argument of the "grep" is a regex!\\
 +....use ''.*'' to replace any characters one or more times.....8-)</note>
  
 ====== Find snapshots ====== ====== Find snapshots ======
welcome/zfs/small_tricks.1630079135.txt.gz · Dernière modification: 2021/08/27 15:45 de 127.0.0.1

DokuWiki Appliance - Powered by TurnKey Linux