File read

This executable can read data from local files.
  1. CommentEach input line is treated as a filename for the file command and the output is corrupted by a suffix : followed by the result or the error of the operation.
    This function can be performed by any unprivileged user.
    file -f /path/to/input-file
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    file -f /path/to/input-file
    This function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.
    file -f /path/to/input-file
    RemarksThe content is corrupted or otherwise altered by the process, thus it might not be suitable for handling arbitrary binary data.
  2. Comment

    Each line is corrupted by a prefix string and wrapped inside quotes.

    If a line in the target file begins with a #, it will not be printed as these lines are parsed as comments.

    It can also be provided with a directory and will read each file in the directory.

    This function can be performed by any unprivileged user.
    file -m /path/to/input-file
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    file -m /path/to/input-file
    This function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.
    file -m /path/to/input-file
    RemarksThe content is corrupted or otherwise altered by the process, thus it might not be suitable for handling arbitrary binary data.