linux-env
Queries the list of environment variables on a Linux system. You can view the names and values of environment variables set in the Logpresso process.
Command properties
| Property | Value |
|---|---|
| Command type | Driver query |
| Required permission | Administrator |
| License usage | Counted |
| Parallel execution | Not supported |
| Distributed execution | Runs on Data Node (mapper) |
Syntax
Output fields
| Field | Type | Description |
|---|---|---|
name | string | Environment variable name |
value | string | Environment variable value |
Error codes
Parsing errors
| Error code | Message | Description |
|---|---|---|
| 95040 | no-read-permission | Executed without administrator privileges |
Runtime errors
N/A
Description
The linux-env command calls System.getenv() from the JVM to query the environment variables set in the Logpresso process. For each environment variable, it returns a record containing the name and value fields.
Administrator privileges are required because environment variables may contain system configuration information such as file system paths and user information.
Examples
-
Query all environment variables
linux-envQueries all environment variables set in the Logpresso process.
-
Search for a specific environment variable
linux-env | search name == "PATH"Queries the value of the
PATHenvironment variable. -
Sort environment variables by name
linux-env | sort nameQueries environment variables sorted by name.