config/bash: pve tools
This commit is contained in:
parent
eda4de9d2c
commit
d79346de86
|
@ -14,6 +14,14 @@ alias scr="$sudo systemctl daemon-reload && $sudo systemctl reload-or-restart"
|
|||
alias hist='history | less'
|
||||
alias m='mv -vi'
|
||||
|
||||
# Fast Find
|
||||
ff() {
|
||||
name=$1
|
||||
shift
|
||||
$(command -v fd || echo fdfind) --hidden "$name" ||
|
||||
find "$@" -name "*$name*"
|
||||
}
|
||||
|
||||
highlight() { echo "[4m$1[0m"; }
|
||||
status() {
|
||||
highlight 'System'
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
[[ $- == *i* ]] && zfs list -d 0
|
||||
|
||||
alias cluster='scr corosync && scr pvesr'
|
||||
qcow() { qemu-img convert $1 -O qcow2 ${2:-$1}.qcow2; }
|
||||
extrac() {
|
||||
for var; do
|
||||
arg=${var%.lzo}
|
||||
out=$(basename ${arg%.vma})
|
||||
lzop -x $arg.lzo
|
||||
vma extract $arg $out &&
|
||||
( cd $out && find *.raw -exec qemu-img convert {} -O qcow2 $arg-{}.qcow2 \; )
|
||||
done
|
||||
}
|
Loading…
Reference in New Issue