O significado de um hífen em find -perm -xxx

0

Estou apenas curioso para saber o que esse hífen extra faz no segundo comando, comparado ao primeiro comando.

    
por user240888 15.07.2017 / 18:47

1 resposta

1

Está na página de manual :

   -perm -mode                                                              
          All of the permission bits mode are set for the file.   Symbolic  
          modes  are accepted in this form, and this is usually the way in  
          which would want to use them.  You must specify 'u', 'g' or  'o'  
          if  you use a symbolic mode.   See the EXAMPLES section for some  
          illustrative examples.

E também em POSIX :

-perm [-]mode
The mode argument is used to represent file mode bits. It shall be identical in format to the symbolic_mode operand described in chmod, and shall be interpreted as follows. To start, a template shall be assumed with all file mode bits cleared. An op symbol of '+' shall set the appropriate mode bits in the template; '-' shall clear the appropriate bits; '=' shall set the appropriate mode bits, without regard to the contents of the file mode creation mask of the process. The op symbol of '-' cannot be the first character of mode; this avoids ambiguity with the optional leading <hyphen-minus>. Since the initial mode is all bits off, there are not any symbolic modes that need to use '-' as the first character.

    
por 15.07.2017 / 18:54

Tags