Number the lines of a file
show file with line numbers linux | print line numbers command line | which line is this on | nl | lines | numberingnl -ba /var/www/vhosts/example.com/httpdocs/.htaccessPrefixes each line with its number. The -ba option numbers all lines including empty ones, so the count matches editors and error messages. Without -ba, nl skips blank lines when counting.
Note: For a targeted search with line numbers, grep -n muster datei is usually faster.
Also searched as
- show file with line numbers linux
- print line numbers command line
- which line is this on