How can you change the owner or group of a file?



How can you change the owner or group of a file?..

Answer / hr@tgksolutions.com

The chown command is used to change the owner of a file or directory. For instance, chown newowner filename would change the file's owner to "newowner". If you want to change both the owner and the group simultaneously, you will use a syntax like chown newowner:newgroup filename. For altering only the group, the chgrp command is used. As with most UNIX commands, care should be taken with these tools, ensuring that ownership is only granted to trusted users.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Unix Commands Interview Questions

How do I search for text in vi?

0 Answers  


The command grep first second third /usr/you/myfile a) prints lines containing the words first, second or third from the file /usr/you/myfile b) searches for lines containing the pattern first in the files second, third, and /usr/you/myfile and prints them c) searches the files /usr/you/myfiel and third for lines containing the words first or second and prints them d) replaces the word first with the word second in the files third and /usr/you/myfile e) None of the above

4 Answers   IBM,


what is the cmd to remove the comment lines from a file and to display the original text without comments? thanks in advance......

5 Answers  


How to check the flavor of UNIX?

8 Answers   HCL, Syntel,


What are grep patterns?

0 Answers  


What is nr in awk command?

0 Answers  


What is awk used for?

0 Answers  


What is the difference between Shell Programming and Shell scripting?

10 Answers   HCL, TCS, Wipro,


What does touch command do in unix?

0 Answers  


What Command is used to make a directory?

4 Answers   IBM,


Using unix command how to display no of records in oracle?

0 Answers  


What is the use of touch command in there?

1 Answers   Accenture,


Categories