March 9, 2011
chown : Change Owner And Group File or Directory
We can get information from a file in Linux with command :
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.
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.