< Perl Programming < Keywords

The chown keyword

chown changes the owner and probably the group of a LIST of files. The first two elements of LIST must be numerical and contain the uid and gid. If one or both of these numbers are equal to -1, this is interpreted on most system that these values are to be left unchanged. Returns the number of successfully changed files.

Syntax

  chown LIST

Examples

  $cnt = chown $uid, $gid, 'foo', 'bar';
  []
  chown $uid, $gid, @filenames;
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.