logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git

chown.1 (1670B)


  1. .\" utils-std: Collection of commonly available Unix tools
  2. .\" Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. .\" SPDX-License-Identifier: MPL-2.0
  4. .Dd 2024-04-27
  5. .Dt CHOWN 1
  6. .Os
  7. .Sh NAME
  8. .Nm chown , chgrp
  9. .Nd Change files ownership
  10. .Sh SYNOPSIS
  11. .Nm chown
  12. .Op Fl v
  13. .Op Fl h | Fl R Op Fl HLP
  14. .Ar owner Ns Op : Ns Ar group
  15. .Ar file...
  16. .Nm chgrp
  17. .Op Fl v
  18. .Op Fl h | Fl R Op Fl HLP
  19. .Ar group
  20. .Ar file...
  21. .Sh DESCRIPTION
  22. .Nm chown
  23. sets the user ID given by
  24. .Ar owner ,
  25. and when given by
  26. .Ar group ,
  27. the group ID on each given
  28. .Ar file .
  29. .Pp
  30. .Nm chgrp
  31. sets the group ID given by
  32. .Ar group
  33. on each given
  34. .Ar file .
  35. .Pp
  36. The
  37. .Ar owner
  38. and
  39. .Ar group
  40. arguments can be either numeric IDs, or names.
  41. Ownership refers to both user and group.
  42. .Sh OPTIONS
  43. .Bl -tag -width Ds
  44. .It Fl h
  45. If
  46. .Ar file
  47. is a symbolic link, set it's ownership.
  48. .It Fl H
  49. If
  50. .Fl R
  51. is also specified,
  52. and
  53. .Ar file
  54. refers to a symbolic link itself refering to a directory,
  55. change ownership of the directory and it's childs.
  56. .It Fl L
  57. If
  58. .Fl R
  59. is also specified,
  60. and symbolic links refering to directories are found,
  61. change ownership of said directories and their childs.
  62. .It Fl P
  63. If
  64. .Fl R
  65. is also specified,
  66. change ownership of symbolic links without dereferencing.
  67. .It Fl R
  68. Recurse into directories.
  69. .It Fl v
  70. Verbose, print a message about each processed file, whether a change was made or not.
  71. .El
  72. .Sh EXIT STATUS
  73. .Ex -std
  74. .Sh SEE ALSO
  75. .Xr stat 1
  76. .Sh STANDARDS
  77. .Nm
  78. should be compliant with the
  79. IEEE Std 1003.1-2024 (“POSIX.1”)
  80. specification.
  81. .Pp
  82. The
  83. .Fl v
  84. option is an extension, also present in GNU coreutils.
  85. .Sh AUTHORS
  86. .An Haelwenn (lanodan) Monnier Aq Mt contact+utils@hacktivis.me