Skip to content
Ricky
Chinese

搜尋

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

Linux

All posts

Add SFTP user and share directory dev_test_user, qa_test_user 同權限 dev_user, qa_user 同權限 1. 建立共享資料夾(SFTP 使用的資料夾) sudo mkdir -p /home/{test,prod}/{exchange,upload} sudo mkdir -p /home/{test,prod}/exchange/success …

1 分鐘

Container security fundamentals: Exploring containers as processes Container security fundamentals part 2: Isolation & namespaces Container security fundamentals part 3: Capabilities Container security …

在 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 在啟動時會解析 …

從零開始的容器 容器檔案系統 $ wget https://github.com/ericchiang/containers-from-scratch/releases/download/v0.1.0/rootfs.tar.gz $ sha256sum rootfs.tar.gz c79bfb46b9cf842055761a49161831aee8f4e667ad9e84ab57ab324a49bc828c …

如何刪除檔名含有不可列印字元的檔案 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 …

Shell Script 最佳實務 重點 第一行就用 #!/usr/bin/env bash。 檔案使用 .sh(或 .bash)副檔名。 在腳本開頭使用 set -o errexit。 也建議使用 set -o nounset。 用 "${VARNAME-}" 取代 "$VARNAME" 使用 set -o pipefail。 使用 set -o xtrace,並檢查 $TRACE 環境變數。 if [[ …