commandUnix


คำสั่ง Unix Basic

chown

Linux Command – chown ใช้ในเปลี่ยนเจ้าของ file หรือ directory รวมทั้ง file owner และ group owner

 

คำสั่ง

1. เปลี่ยนเจ้าของ file

chown <user> <filename>

$ ls -ltr test-rwx------ 1 root root 0 May 7 00:22 test$ chown games test$ ls -ltr test-rwx------ 1 games root 0 May 7 00:22 test

 

2. เปลี่ยน group เจ้าของ file

chown <:group> <filename>

$ ls -ltr test-rwx------ 1 games root 0 May 7 00:22 test$ chown :staff test$ ls -ltr test-rwx------ 1 games staff 0 May 7 00:22 test
คำสำคัญ (Tags): #command
หมายเลขบันทึก: 644035เขียนเมื่อ 18 มกราคม 2018 21:41 น. ()แก้ไขเมื่อ 18 มกราคม 2018 21:44 น. ()สัญญาอนุญาต: ครีเอทีฟคอมมอนส์แบบ แสดงที่มา-ไม่ใช้เพื่อการค้า-ไม่ดัดแปลงจำนวนที่อ่านจำนวนที่อ่าน:


ความเห็น (0)

ไม่มีความเห็น

พบปัญหาการใช้งานกรุณาแจ้ง LINE ID @gotoknow
ClassStart
ระบบจัดการการเรียนการสอนผ่านอินเทอร์เน็ต
ทั้งเว็บทั้งแอปใช้งานฟรี
ClassStart Books
โครงการหนังสือจากคลาสสตาร์ท