Skip to content
Ricky
Chinese

搜尋

Searching… No matching pages. Matching pages are listed below. Search is unavailable. Please try again.

Command Line

All posts

Tools

tirith: Tirith guards the gate and intercepts suspicious URLs, ANSI injection, and pipe-to-shell attacks before they execute. subtrace: Inspect HTTP requests in any server with just a single command. prek: ⚡ …

設定多個 GitHub 帳號的 SSH 金鑰 使用不同的 Host 值 Host github.com HostName github.com User git IdentityFile ~/.ssh/id_fry_ed25519 Host github-plnx HostName github.com User git IdentityFile ~/.ssh/id_fry_plnx_ed25519 # …

終端機程式遵循的「規則」 規則 1:非互動程式應在按 Ctrl-C 時退出 規則 2:按 q 時,TUI 應退出 規則 3:在空白行上按 Ctrl-D 時,REPL 應退出 規則 4:不要使用超過 16 種顏色 規則 5:支援 readline 鍵綁定 規則 5.1:Ctrl-W 應刪除最後一個單字 規則 6:寫入管道時停用顏色 規則 7:- 表示 stdin/stdout

Advanced macOS Command-Line Tools Useful built-in macOS command-line utilities 苹果:为了安全让 M2 吃灰 sips - image manipulation sips -z <height> <width> <image> resizes the specified image, ignoring the previous …

在 Linux 中偵測 RAID 資訊 lspci lspci | grep RAID 00:1f.2 RAID bus controller: Intel Corporation 82801 Mobile SATA Controller [RAID mode] (rev 04) lshw lshw -class storage *-raid description: RAID bus controller …

測試伺服器是否易受 Shellshock 漏洞影響 Shellshock 漏洞 env x=' () {:;};' 利用 Shellshock 漏洞 當功能忽略使用者指定的指令,改執行 ForceCommand 的內容時,置換指令就會被執行。 使用者的原始指令會被放在 “SSH_ORIGINAL_COMMAND” 環境變數中。若使用者預設 shell 是 Bash,Bash 在啟動時會解析 …

如何刪除檔名含有不可列印字元的檔案 ls -l total 13 -rw-r--r-- 1 ZZ 197121 4 Nov 6 07:08 ' ' -rw-r--r-- 1 ZZ 197121 162 Apr 16 2022 '~$iscord.docx' -rw-r--r-- 1 ZZ 197121 6 Nov 6 06:03 ''$'\302\226' -rw-r--r-- 1 ZZ 197121 4 Nov …

如何在別名指令上使用 which type type grep grep is an alias for grep --color=auto # Bash's type type -P grep /usr/bin/grep # Zsh's type type -p grep grep is /usr/bin/grep GNU which which -a which which: shell built-in …

使用 Vim 當作差異比對工具 指令 vim -d file1.txt file2.txt 或 vimdiff file1.txt file2.txt 在差異視窗間切換: Ctrl-w + Ctrl-w 切換分割視窗方向 ctrl-w + K 將視窗方向由垂直切換為水平。 ctrl-w + H 將視窗方向切回垂直分割。 在變更之間跳轉 ]c 前往下一個變更。 [c 跳回上一個變更。 從差異視窗套用變更: …

Tcpdump 使用总结 命令使用 tcpdump 采用命令行方式,它的命令格式为: tcpdump [ -AdDeflLnNOpqRStuUvxX ] [ -c count ] [ -C file_size ] [ -F file ] [ -i interface ] [ -m module ] [ -M secret ] [ -r file ] [ -s snaplen ] [ -T type ] [ -w …