March 9, 2011
chown : Change Owner And Group File or Directory
We can get information from a file in Linux with command :
ls -l
This is output from my file :
-rw-r–r– 1 root root 0 2011-03-09 13:50 tesfile
If we want to change file owner and group this file from root to toto, we can use this command :
chown root:toto tesfile
This command will change group file. Check status of file with command ls -l
-rw-r–r– 1 root toto 0 2011-03-09 13:50 tesfile
Change owner of file with command :
chown toto tesfile
Check status of file with command ls -l
-rw-r–r– 1 toto toto 0 2011-03-09 13:50 tesfile
If we want to change owner and group file or directory with all subdirectory, we can add option -R in chown command.
3 Comments
Great site. A lot of helpful info here. I¡¦m sending it to several buddies ans additionally sharing in delicious. And certainly, thank you to your sweat! Koha Ditore
I do trust all of the concepts you have presented for your post. They’re really convincing and will definitely work. Nonetheless, the posts are too quick for novices. Could you please lengthen them a bit from next time? Thanks for the post.
Hey there, I appreciate you posting great content covering that topic with full attention to details and providing updated data. I believe it is my turn to give back, check out my website YR4 for additional resources about Thai-Massage.