將根 cmd 輸出傳輸到使用者檔案

通常,人們希望將 root 執行的命令的結果顯示給其他使用者。所述三通命令允許容易地寫入與從執行作為根的命令使用者燙髮一個檔案:

su -c ifconfig | tee ~/results-of-ifconfig.txt

只有 ifconfig 以 root 身份執行。