Page 191 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 191

Unit 10: File System




          -R                                                                                    notes
          --recursive

          Recursively change ownership of directories and their contents.
          -v
          --verbose
          Verbosely  describe  the  action  (or  non-action)  taken  for  every  FILE.  If  a  symbolic  link  is
          encountered during a recursive traversal on a system without the ‘lchown’ system call, and ‘--no-
          dereference’ is in effect, then issue a diagnostic saying neither the symbolic link nor its referent
          is being changed.
          If a colon or dot but no group name follows the user name, that user is made the owner of the files
          and the group of the files is changed to that user’s login group.



             Did u know?  Why the ordinary user cannot change the ownership of files?

          10.3.4 change group

          chgrp changes the group ownership of each given File to Group (which can be either a group
          name or a numeric group id) or to the group of an existing reference file.
          chgrp [Options]... {Group | --reference=File} File...

          -c
          --changes
          like verbose but report only when a change is made
          --dereference

          affect the referent of each symbolic link, rather than the symbolic link itself (this is the default)
          -h
          --no-dereference
          affect each symbolic link instead of any referenced file (useful only on systems that can change
          the ownership of a symlink)
          --no-preserve-root do not treat ‘/’ specially (the default)
          --preserve-root
          fail to operate recursively on ‘/’
          -f

          --silent,
          --quiet
          suppress most error messages
          --reference=RFILE

          use RFILE’s group rather than the specifying GROUP value
          -R
          --recursive




                                           LoveLy professionaL university                                   185
   186   187   188   189   190   191   192   193   194   195   196