Mac OS X 10.5+ 引入隔離機制,首次開啟下載檔案會彈出確認對話框。若覺得煩擾,可依需求選擇:
終端機執行:
# macOS 10.5 (Leopard)
find ~/Downloads -type f -exec xattr -d com.apple.quarantine {} \;
# macOS 10.6+ (Snow Leopard 及更新)
xattr -d -r com.apple.quarantine ~/Downloads
將 Downloads 替換為其他資料夾路徑亦可。大量檔案執行需較久時間。
defaults write com.apple.LaunchServices LSQuarantine -bool NO
執行後重開機,之後開啟任何下載檔案不再彈出警告。
defaults write com.apple.LaunchServices LSQuarantine -bool YES
# 重開機

隔離機制是防禦惡意軟體的重要防線(配合 Gatekeeper)。完全停用後,請確保僅從可信來源下載檔案,並保持系統/瀏覽器更新。一般使用者建議保留預設,僅對特定可信資料夾清除屬性。