↑ ↓ select, Enter open, Esc close

Show a config file without comments and blank lines

Adjust the values, the command updates live
user@server
grep -Ev '^\s*(#|;|$)' /etc/php/8.2/fpm/php.ini

Hides all lines that are empty, contain only whitespace, or start with # or ;, even when preceded by spaces. What remains are the effective settings, which shrinks long files like php.ini, my.cnf or sshd_config down to a few lines. Well suited for comparing two servers.

Note: Comments at the end of a line after a setting are kept. The file itself is not modified.

Also searched as

  • show config file without comments
  • grep remove comments and empty lines
  • show only active settings php.ini

Related one-liners

All in Text processing

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.