Skip to content

Benjr.tw

  • Linux
    • Stress & Performance
    • Hardware Info
    • System Monitor
    • Security
    • Desktop
    • PXE
    • Filesystem Hierarchy Standard
    • Linux 開機選項
    • Linux Package Manager
    • 備份 Backup
  • Virtualization
    • Docker & Podman
    • CoreOS
  • NAS/SAN
  • Programming Language
    • Python
    • Bash shell script
    • Perl
    • PHP
    • Node.JS
    • VBA
    • javascript
    • Power Query
    • PowerShell
  • WordPress
  • DataBase
    • 資料庫安裝
    • 資料庫語法
    • SQLite
    • MariaDB JSON

Programming Language

Bash Shell Script – eval

2023-07-272023-07-27 adminBash shell script, Linux, RedHat / CentOS

Loading

測試環境為 CentOS8 (虛擬機) 在 Linux shell 會將變數轉換成字串,缺點是當變數是指令時,也只會當作字串. 這時候透過 eval 指令就可以先將後面 的參數替換成字串,再把全部當作指令到 Shell 來執行. eval 格式:

Read more

Excel Power Query – Excel.Workbook & Excel.CurrentWorkbook

2022-11-102022-11-10 adminPower Query, Windows

Loading

測試環境 Windows 10 + Excel 2016 透過 Excel 的 Power Query 下面指令可以讀取到 Excel 的表格資料(資料須先做成表格). Excel.CurrentWorkbook – https://learn.microsoft.com/zh-tw/p […]

Read more

Windows – PsExec

2022-07-272022-11-29 adminPowerShell, Windows

Loading

測試環境 Windows 10 (PsExec)-> Windows 10 (被控制端) Windows 10 (被控制端, IP:192.168.111.230) 這邊需要開啟可以在遠端執行端指令的權限. 防火牆 需開啟 檔案及印表機共用 權限,如下圖 新增 LocalAccountTokenFi […]

Read more

Windows – S2D (Storage Space Direct)

2021-11-042022-11-29 adminPowerShell, Storage, Windows

Loading

S2D (Storage Space Direct) 儲存空間直接存取功能把多台 Server (至少需要 2 台)的本地端機磁碟整合成一個大的儲存空間.這些空間可以再透過 SMB 3.0 分享給應用程式來使用. 但 S2D 需要有 Windows AD (Active Directory) 與 D […]

Read more

Linux – 取代文字檔案內字串

2021-09-102021-12-08 adminBash shell script, Linux

Loading

除了使用文字編輯器改變 TEXT (.txt) 文字檔案內容外,我們可以透過 sed 指令來處理. 先來產生一個文字檔. 透過 sed 的 s/regexp/replacement/ , 符合 regexp (正規表示式) 的字串會取代 replacement 字串,但同一行有多個符合 regexp […]

Read more

Windows – Enable ICMP (Ping)

2021-07-202022-11-29 adminPowerShell, Windows

Loading

測試環境 Windows 10 (虛擬機) 想從 MAC 系統確認一下 Windows 10 (虛擬機) 是不是在,結果都 ping 不到. 原來 Windows 預設防火牆把 ping (ICMP) 關掉了,可以用以下兩種方式來開啟. PowerShell 使用 Administrator 開啟 […]

Read more

Windows / Linux – 透過 SSH 來遠端執行 PowerShell 指令

2020-07-142022-11-29 adminLinux, PowerShell, RedHat / CentOS, Windows

Loading

如果需要誇平台 Windows Linux 來遠端執行 PowerShell 指令,可以透過 SSH (SSH 使用非對稱式 與 對稱式加密來確保遠端連線的安全性,有興趣參考這一篇 – https://benjr.tw/301) 來遠端執行 PowerShell 指令. 在 PowerS […]

Read more

Windows – OpenSSH Server

2020-06-242022-11-29 adminPowerShell, Windows

Loading

測試環境為 VMWare 虛擬機 Windows 10 – 1809 Linux CentOS 7 macOS Catalina SSH 使用非對稱式 與 對稱式加密來確保遠端連線的安全性,有興趣參考這一篇 – https://benjr.tw/301 從 Windows S […]

Read more

Windows – WSL2 (Windows Subsystem for Linux)

2019-09-272022-11-29 adminLinux, PowerShell, Ubuntu, Windows

Loading

測試環境為 Windows10 Pro (Version :1903 , Build :18990.1 ,要使用 WSL2 其 Windows 版本須大於 Build : 18917) , 虛擬機 (VMware Fusion 11.5) . WSL2 使用 Hyper-V 的虛擬化技術來運行,透過 […]

Read more

Bash shell script – function

2019-01-242019-01-24 adminBash shell script, Linux, RedHat / CentOS

Loading

測試環境為 CentOS7 x86_64 (虛擬機) 參考文章 – https://ryanstutorials.net/bash-scripting-tutorial/bash-functions.php Linux Bash shell script 使用函數 function 參考 […]

Read more

文章導覽

較舊的文章

近期文章

  • Windows – Network Sharing + Port forwarding to VM
  • Ansible – gather facts
  • Ansible – host_vars 定義特定的變量
  • Ansible 範例 – Chrony daemon
  • Ubuntu NTP Client 校時設定

近期留言

  • 「Jackson2734」於〈Ubuntu NTP Client 校時設定〉發佈留言
  • 「w」於〈Ubuntu 16.04 Server PXE 安裝〉發佈留言
  • 「admin」於〈TCP/IP 常見封包〉發佈留言
  • 「stu」於〈TCP/IP 常見封包〉發佈留言
  • 「student」於〈Linux command – tcpdump〉發佈留言

分類

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文
  • Privacy Policy
  • 隱私權政策
Powered by WordPress | Theme: Astrid by aThemes.