server task file cat
Returns the contents of a specified file to the administration console. This command requires authentication of administrator ID and password.
server task server_name file cat file_name byte_offset [-max bytes] [-encode]
Options
- server_name
- Name of the ISAM authorization server on which the file is hosted.
- file_name
- Fully qualified name of the file which is to be retrieved.
- byte_offset
- Specifies the offset in bytes from the start of the file at which the data is retrieved.
- -max bytes
- Maximum number of bytes to be returned from the file. If we do not specify this parameter, the maximum number of bytes returned is controlled by the max-file-cat-command-length value in the [server] stanza. The max-file-cat-command-length value takes precedence over the -max bytes value. If the specified file is larger than the max-file-cat-command-length value, the returned data is truncated.
- --encode
- Designates the contents of the file must be base-64 encoded before it is returned. (Optional)
Authorization
Users and groups that require access to this command must have the s (administration) permission in the ACL that governs the /WebSEAL/host_name-instance_name object. For example, the sec_master administrative user has this permission by default.
Return codes
- 0
- The command completed successfully. For WebSEAL server task commands, the return code is 0 when the command is sent to the WebSEAL server without errors. However, even after the command was successfully sent, the WebSEAL server might not successfully complete the command. The WebSEAL server returns an error message.
- 1
- The command failed. When a command fails, the pdadmin command provides a description of the error and an error status code in hexadecimal format, for example, 0x14c012f2. See "Error messages" in the IBM Knowledge Center for a list of the ISAM error messages by decimal or hexadecimal codes.
For information about WebSEAL junctions, see the Administering topics in the IBM Knowledge Center.
This command is available only when WebSEAL is installed.
Example
The following example requests the first 512 bytes of data (base-64 encoded) from the readme.txt file. The file is in the /temp/ folder on server03:pdadmin> server task server03 file cat /temp/readme.txt 0 -max 512 -encodeThe output is the content of the specified file.Parent topic: pdadmin commands