1N/A/*********************************************************************** 1N/A* This software is part of the ast package * 1N/A* Copyright (c) 1992-2011 AT&T Intellectual Property * 1N/A* and is licensed under the * 1N/A* Common Public License, Version 1.0 * 1N/A* by AT&T Intellectual Property * 1N/A* A copy of the License is available at * 1N/A* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * 1N/A* Information and Software Systems Research * 1N/A* Glenn Fowler <gsf@research.att.com> * 1N/A* David Korn <dgk@research.att.com> * 1N/A***********************************************************************/ 1N/A"[-?@(#)$Id: chgrp (AT&T Research) 2011-01-03 $\n]" 1N/A"[+NAME?chgrp - change the group ownership of files]" 1N/A"[+DESCRIPTION?\bchgrp\b changes the group ownership of each file" 1N/A" to \agroup\a, which can be either a group name or a numeric" 1N/A" group id. The user ownership of each file may also be changed to" 1N/A" \auser\a by prepending \auser\a\b:\b to the group name.]" 1N/A"[+NAME?chown - change the ownership of files]" 1N/A"[+DESCRIPTION?\bchown\b changes the ownership of each file" 1N/A" to \auser\a, which can be either a user name or a numeric" 1N/A" user id. The group ownership of each file may also be changed to" 1N/A" \auser\a by appending \b:\b\agroup\a to the user name.]" 1N/A"[b:before?Only change files with \bctime\b before (less than) the " 1N/A "\bmtime\b of \afile\a.]:[file]" 1N/A"[c:changes?Describe only files whose ownership actually changes.]" 1N/A"[f:quiet|silent?Do not report files whose ownership fails to change.]" 1N/A"[l|h:symlink?Change the ownership of symbolic links on systems that " 1N/A "support this. Implies \b--physical\b.]" 1N/A"[m:map?The first operand is interpreted as a file that contains a map " 1N/A "of space separated \afrom_uid:from_gid to_uid:to_gid\a pairs. The " 1N/A "\auid\a or \agid\a part of each pair may be omitted to mean any \auid\a " 1N/A "or \agid\a. Ownership of files matching the \afrom\a part of any pair " 1N/A "is changed to the corresponding \ato\a part of the pair. The matching " 1N/A "for each file operand is in the order \auid\a:\agid\a, \auid\a:, " 1N/A ":\agid\a. For a given file, once a \auid\a or \agid\a mapping is " 1N/A "determined it is not overridden by any subsequent match. Unmatched " 1N/A "files are silently ignored.]" 1N/A"[n:show?Show actions but don't execute.]" 1N/A"[N:numeric?By default numeric user and group id operands are first " 1N/A "interpreted as names; if no name exists then they are interpreted as " 1N/A "explicit numeric ids. \b--numeric\b interprets numeric id operands as " 1N/A"[r:reference?Omit the explicit ownership operand and use the ownership " 1N/A "of \afile\a instead.]:[file]" 1N/A"[u:unmapped?Print a diagnostic for each file for which either the " 1N/A "\auid\a or \agid\a or both were not mapped.]" 1N/A"[v:verbose?Describe changed permissions of all files.]" 1N/A"[H:metaphysical?Follow symbolic links for command arguments; otherwise " 1N/A "don't follow symbolic links when traversing directories.]" 1N/A"[L:logical|follow?Follow symbolic links when traversing directories.]" 1N/A"[P:physical|nofollow?Don't follow symbolic links when traversing " 1N/A"[R:recursive?Recursively change ownership of directories and their " 1N/A"[X:test?Canonicalize output for testing.]" 1N/A "[+0?All files changed successfully.]" 1N/A "[+>0?Unable to change ownership of one or more files.]" 1N/A"[+SEE ALSO?\bchmod\b(1), \btw\b(1), \bgetconf\b(1), \bls\b(1)]" 1N/A#
endif /* _lib_chown */ 1N/A * parse uid and gid from s 1N/A for (t = s; (n = *t) && n !=
':' && n !=
'.' && !
isspace(n); t++);
1N/A if ((n = t++ - s) >=
sizeof(
buf))
1N/A if ((n = t++ - s) >=
sizeof(
buf))