chwon指令是用來變更檔案或目錄的擁有者與群組擁有者。

必須擁有超級使用者特權才能使用這個命令。

語法: chown [owner] [:[group]] file...

chown 參數範例

參數                 結果

chris            將檔案擁有者從當下的使用者變更為使用者chris。

chris:users  將檔案擁有者從當下的使用者變更為使用者chris,檔案群組擁有者

                    變更為群組users。

:admins       將檔案擁有者群組變更為群組admin。檔案擁有者不變。

例:which  chown command will change the ownship  to dave and the group to staff on  a file named data.txt?

答:chwon dave:staff data.txt


arrow
arrow
    全站熱搜

    風之浪人 發表在 痞客邦 留言(0) 人氣()