update function and scripts
This commit is contained in:
parent
0b866e6c06
commit
c3b7530ae2
|
@ -2,10 +2,7 @@ alias svim="sudo -e"
|
|||
alias vissh="$EDITOR ~/.ssh/config"
|
||||
alias vihosts="sudo -e /etc/hosts"
|
||||
|
||||
if type htop >/dev/null; then
|
||||
alias top="htop"
|
||||
fi
|
||||
|
||||
alias http-server="python -m http.server"
|
||||
alias rename="perl-rename"
|
||||
|
||||
|
|
|
@ -1,19 +1,22 @@
|
|||
# edit alias
|
||||
vialias() {
|
||||
$EDITOR $ZSH_CUSTOM/100-alias.zsh
|
||||
source $ZSH_CUSTOM/100-alias.zsh
|
||||
}
|
||||
|
||||
# edit function
|
||||
vifunction() {
|
||||
$EDITOR $ZSH_CUSTOM/101-function.zsh
|
||||
source $ZSH_CUSTOM/101-function.zsh
|
||||
}
|
||||
|
||||
# scan network
|
||||
nmap-libvirt() {
|
||||
__nmap_iface 'virbr[0-9]+' $@
|
||||
}
|
||||
|
||||
nmap-tun() {
|
||||
__nmap_iface 'tun[0-9]+' $@
|
||||
__nmap_iface '(tun|tap)[0-9]+' $@
|
||||
}
|
||||
|
||||
nmap-local() {
|
||||
|
@ -34,3 +37,8 @@ __nmap_iface() {
|
|||
printf "Scanning %s\n" "$addr"
|
||||
nmap $opt $addr_list
|
||||
}
|
||||
|
||||
# calculator
|
||||
\=() {
|
||||
bc -l <<<"$*"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
shopt -s nullglob
|
||||
for d in /sys/kernel/iommu_groups/*/devices/*; do
|
||||
n=${d#*/iommu_groups/*}; n=${n%%/*}
|
||||
printf 'IOMMU Group %s ' "$n"
|
||||
lspci -nns "${d##*/}"
|
||||
done;
|
||||
|
Loading…
Reference in New Issue