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.
My name is Toto Sugito. This is my notes when I try something. Maybe, this is NOT THE BEST SOLUTION for your problems. If you have other method or idea that better with my post, please share in this blog. Thank for visiting my site.