作者彙整:admin

tar + ssh

壓縮到遠端 tar -zcpf – xxx | ssh remote@ip dd of=/backup/xxx.tar.gz 壓縮檔在遠端解壓 cat xxx.tar.gz | ssh remote@ip tar.gz zxf – -C /restore #-C 後面接遠端主機的路徑 傳輸過程壓縮在解壓 tar -zcpf – xxx | ssh -c /resoter remote@server tar -zxf -

發表於 未分類 | 發表迴響

powershell 清單ping

參考節錄: https://www.weithenn.org/2021/07/powershell-ping.html?fbclid=IwAR0vtSQS_CRZiBNDSm0eOc89RQlY2Y6-hsU0OCKb7mu0Ub7yxjTLwSY0MQQ # ================================================================== # Description: Test ping connectivity by hosts list # ================================================================== # Get hosts list $Ping_hosts = Get-Content -Path C:\PowerShell\Ping_hosts.txt # Verify the number of hosts (Get-Content -Path C:\PowerShell\Ping_hosts.txt).Count # Test ping connectivity by hosts list foreach … 繼續閱讀 →

發表於 未分類 | 發表迴響

Deployment Imaging and Management 部署映像服務和管理

Dism /Online /Cleanup-Image /ScanHealth 掃描全部系統文件和系統映像文件是否與官方版一致(無論你是否備份或製作過系統映像) Dism /Online /Cleanup-Image /CheckHealth 檢查文件的損壞程度 DISM /Online /Cleanup-image /RestoreHealth 一般性損壞可以修復 Dism /online /Get-CurrentEdition 檢查映像版本 Dism /online /Get-TargetEditions 檢查系統是否可升級 咱們首先需要將映像(.iSO)「裝載」在系統中,然後 Dism /Apply-Image /ImageFile:X:\sources\install.wim /Index:1 /ApplyDir:C:\ 其中,X代表映像掛載後的盤符

發表於 未分類 | 發表迴響

clear raid disk

mdadm –zero-superblock /dev/sda1 /dev/sdb1 或 wipefs -a /dev/sdb

發表於 未分類 | 發表迴響

dd 常用法

dd clone disk dd if=/dev/sda of=/dev/sdb bs=64k conv=noerror,sync dd make disk image dd if=/dev/sda conv=sync,noerror bs=128k |gzip -c centos-disk.gz dd restore image gunzip -c centos-disk.gz | dd of=/dev/sdb conv=noerror #告訴 dd 繼續操作,忽略所有讀取錯誤。 sync #如果有任何讀取錯誤,則添加帶有零的輸入塊,因此數據偏移量保持同步。 See progress while making an image … 繼續閱讀 →

發表於 未分類 | 發表迴響

更新Windows 21H1後,網芳、網路印表機不能使用

1: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters] "AllowInsecureGuestAuth"=dword:1 Dword (32位元) AllowInsecureGuestAuth,數值設定為1 2.Windows Server gpedit.msc 電腦設定系統-管理範本–> 網路-Lanman 工作站 啟用不安全的來賓 登入

發表於 未分類 | 發表迴響

powershlle 底下的 telnet

test-netconnection -computername tw.yahoo.com -port 80

發表於 未分類 | 發表迴響

PVE 安裝無法登入畫面

遇到發生在 有顯卡的筆電 Proxmox VE 安裝的開機啟動選項, 按下 e 之後追加幾個參數 rd.driver.blacklist=nouveau nouveau.modeset=0 , 並按下 Ctrl + X 啟動之後,成功進入開機引導程序。

發表於 未分類 | 發表迴響

openvpn 不使用本地流量上網

在設定檔上加上這句 #redirect-gateway def1 或以下設定檔 #Template client.ovpnclient client dev tun proto tcp-client #remote FQDN remote FQDN port 1194 nobind persist-key persist-tun tls-client remote-cert-tls server ca ca.crt cert client.crt key client.key verb 4 mute 10 cipher AES-256-CBC auth SHA1 auth-user-pass secret auth-nocache … 繼續閱讀 →

發表於 未分類 | 發表迴響

zfs vm 搬移

qcow2 搬移 mkdir /vmimage/images/111 cp /vmimage/images/111/vm-111-disk-0.qcow2 /vmimage/images/112/vm-112-disk-0.qcow2 zfs 搬移 zfs snapshot vmimage/vm-111-disk-0@copy #copy zfs send -Rv vmimage/vm-111-disk-0@copy | zfs receive -F vmimage/vm-112-disk-0 #Send zfs destroy vmimage/vm-111-disk-0@copy ; zfs destroy vmimage/vm-112-disk-0@copy #Destroy vi /etc/pve/qemu-server/vm112 的設定

發表於 未分類 | 發表迴響