Assorted less(1) tips
“word to your moms, I came to drop bombs, I’ve got more less tips than the Bible’s got Psalms.” In a recent discussion on Reddit I shared a number of tips about the common utility less(1) that others found helpful so I figured I’d aggregate some of those tips here. Operating on multiple files While most folks invoke less at the tail of a pipeline like $ command | less Invoking less in a pipeline you can directly provide one or more files to open $ less README.txt file.c *.md Invoking less directly Adding files after starting When reading a document, sometimes you want to view another file, adding it to the file list. Perhaps while reading some C source code you want to also look over the corresponding header-file. You can add that header-file to the argument list with :e…