O utilitário fuser
está limitado pelos padrões abaixo:
O racional para isto ter saída de informações de diagnóstico para stderr
. Isso não inclui apenas os erros, mas qualquer coisa que não seja a saída de dados primária do utilitário.
Embora esses dados sejam úteis, se forem incluídos no stdout
, a análise do resultado será cada vez mais difícil.
Se stdout
estiver sendo redirecionado ou filtrado, o stderr continuará imprimindo no terminal.
De acordo com o IEEE Std 1003.1, 2004 Edition , o utilitário fuser
:
The *fuser* utility shall write to standard error additional information about the
named files indicating how the file is being used.
STDERR
The fuser utility shall write diagnostic messages to standard error. The fuser utility also shall write the following to standard error:
The pathname of each named file is written followed immediately by a colon.
For each process ID written to standard output, the character 'c' shall be written to standard error if the process is using the file as its current directory and the character 'r' shall be written to standard error if the process is using the file as its root directory. Implementations may write other alphabetic characters to indicate other uses of files.
When the -u option is specified, characters indicating the use of the file shall be followed immediately by the user name, in parentheses, corresponding to the process' real user ID. If the user name cannot be resolved from the process' real user ID, the process' real user ID shall be written instead of the user name.
When standard output and standard error are directed to the same file, the output shall be interleaved so that the filename appears at the start of each line, followed by the process ID and characters indicating the use of the file. Then, if the -u option is specified, the user name or user ID for each process using that file shall be written.
A
<newline>
shall be written to standard error after the last output described above for each file operand.
Referência