gerlost.blogg.se

Change timezone linux redhat
Change timezone linux redhat





change timezone linux redhat

Also, there exists a flag ‘–dereference’ for the same. This is the default behavior of the chown command. When the chown command was issued on symbolic link to change the owner as well as the group then its the referent of the symbolic link ie ‘tmpfile’ whose owner and group got changed. Lets see what happens if chown command is issued on a symbolic link: # chown root:friends tmpfile_symlnk

change timezone linux redhat

So we see that the symbolic link ‘tmpfile_symlink’ links to the file ‘tmpfile’. Lrwxrwxrwx 1 himanshu family 7 20:03 tmpfile_symlnk -> tmpfile Using chown command on symbolic link file So we see that using the syntax ‘:’, the owner as well as group can be changed in one go. Change both owner and the group # ls -l tmpfile So we see that by just adding a ‘:’ followed by the new group name, the group of the file can be changed. If you observe closely, the group of the file changed from ‘family’ to ‘friends’. rw-r-r- 1 himanshu friends 0 20:03 tmpfile Through the chown command, the group (that a file belongs to) can also be changed. So we see that the owner of the file was changed from ‘himanshu’ to ‘root’. rw-r-r- 1 himanshu family 0 20:03 tmpfile Change the owner of a file # ls -lart tmpfile In this article, we will discuss the ‘chown’ command as it covers most part of the ‘chgrp’ command also.Įven if you already know this command, probably one of the examples mentioned below might be new to you. You can use chown and chgrp commands to change the owner or the group of a particular file or directory. Every file is associated with an owner and a group. The concept of owner and groups for files is fundamental to Linux.







Change timezone linux redhat