file
This documentation does not apply to the most recent version of Splunk. Click here for the latest version.
file
Synopsis
Processes the given file as if it were indexed.
Syntax
file filename
Arguments
- filename
- Syntax: <path>
- Description: The path and name of a file to display.
Description
If filename is a file the file command will read the file as if it was indexed in splunk, if filename is a directory file will display the list of files in that directory with the option of adding those to the inputs.
Examples
Example 1: Display events from the file "messages.1" as if the events were indexed in Splunk.
| file /var/log/messages.1
See also
This documentation applies to the following versions of Splunk: 4.0 , 4.0.1 , 4.0.2 , 4.0.3 , 4.0.4 , 4.0.5 , 4.0.6 , 4.0.7 , 4.0.8 , 4.0.9 , 4.0.10 , 4.0.11 View the Article History for its revisions.