Usando ponto (.) como delimitador para especificar o grupo em chown

29

Eu sempre fiz:

chown nimmylebby:admins file

Eu vejo que isso também funciona:

chown nimmylebby.admins file

Pode parecer uma pergunta idiota, mas estou realmente curioso sobre como funciona a segunda opção. Não está documentado na manpage do meu chown (GNU coreutils 8.4, 10/10). Isto é talvez uma interpretação de Bash? Ou um formato obsoleto para o argumento?

    
por Belmin Fernandez 24.10.2010 / 21:10

2 respostas

25

A partir do chown (8) página de manual no Mac OS X versão 10.9:

COMPATIBILITY

Previous versions of the chown utility used the dot (''.'') character to distinguish the group name. This has been changed to be a colon ('':'') character, so that user and group names may contain the dot character.

    
por 24.10.2010 / 21:25
15

Em info coreutils 'chown invocation' para o GNU coreutils :

Some older scripts may still use '.' in place of the ':' separator. POSIX 1003.1-2001 (see Standards conformance) does not require support for that, but for backward compatibility GNU chown supports '.' so long as no ambiguity results. New scripts should avoid the use of '.' because it is not portable, and because it has undesirable results if the entire owner'.'group happens to identify a user whose name contains '.'.

    
por 24.10.2010 / 21:29