Questions tagged [less]

less is a terminal pager program on Unix, Windows, and Unix-like systems used to view (but not change) the contents of a text file one screen at a time.

36 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
0 answers
47 views

How do I see current status of runtime options of less utility?

Less takes runtime options from LESS environment variable + system-wide lesskey file + $HOME/.less file + command line arguments + runtime commands invoked by user. Use case After toggling some ...
maoizm's user avatar
  • 1,073
3 votes
0 answers
566 views

How can I paginate Docker commands?

The output of some Docker commands (such as docker container ls) takes a lot of space of my terminal, causing a lot of line breaks, which makes the reading to be a frustrating task. So I wondered if ...
Luiz Felipe's user avatar
2 votes
1 answer
422 views

G in less doesn't go to the bottom

when I use G in less it's only scrolling down one screen length, rather than going to the bottom. vim on the otherhand will scroll to the bottom. Is there a reason for this behaviour?
user1068446's user avatar
  • 1,420
2 votes
1 answer
262 views

How to get fish-style formatting with less

Let's say I run a command like ls in fish and get lots of output, how do I scroll through it and still keep the fish formatting or something like it? ls | less doesn't keep the formatting. I know ...
qwertyuiop's user avatar
2 votes
0 answers
338 views

Neither less or less -X clear screen on exit. (Trust me, I googled....)

Neither less or less -X clear screen on exit. At the same time, vim does.... Env iTerm2, protocol mosh, server Centos + tmux + zsh iTerm2: report term as xterm-256color tmux: set -g terminal-...
Jiesi Luo's user avatar
2 votes
1 answer
917 views

How can I set `less` or `more` max lines (scrollable height) limit/boundary in linux?

(Sorry for the title. Any suggestions?) I've set my commandline PS1 to cover 3 lines: white space user, server and pwd $ or # to input I think less (or more?) is configured to break after window's ...
Rudie's user avatar
  • 759
1 vote
0 answers
139 views

In less cmd, I cannot use mouse to select characters expect press Shift button. Why?

Refered to this post, I had set export LESS='-riF --mouse --wheel-lines=3', and solved the scrolling problem, but I coundn't select any charaters on the screen except pressing SHIFT button. This is ...
Robin.Cai's user avatar
1 vote
2 answers
54 views

Less - How to jump to a part in a large pdf?

I am using less to view a large (Think over 5k page) pdf in my terminal. The pdf is divided up into chapters. I am curious to know, how do I go to a certain chapter in the pdf without knowing the line ...
user43850's user avatar
1 vote
0 answers
32 views

lesspipe.sh doesn't save tabstop setting

I like to use 4 spaces for tabstop, so my less settings is: export LESS="-x4 -FRS" export LESSOPEN='|lesspipe.sh %s' But when I view source file with less src.c I see 8 spaces which is not what I ...
LennyB's user avatar
  • 111
1 vote
0 answers
148 views

Multi-page output :: text select with tmux over ssh

I have a local terminal within tmux. Now I connect to a remote server via SSH and run some command piped to less. With tmux I can easily select part or the entire screen, however I can not select text ...
jdevelop's user avatar
  • 141
1 vote
1 answer
91 views

Various environments and weird less behaviour

I am playing with I/O redirection and have problem with less behaving differently in two environments. Both environments are Solaris-based and are of the same version. I am executing program in two ...
lessbehaviour's user avatar
1 vote
0 answers
324 views

Can vim be used to view a growing file?

I often use vim's view for viewing files. Is there a way to use it for a growing file so that I can see the progress as it's happening? Something similar to tail -f or less +F I have two use cases:...
Petr's user avatar
  • 3,153
1 vote
0 answers
394 views

Need to CTRL-C "less" in order to see file?

I have never seen this behavior before using "less" and am wondering if it speaks to a corrupted file? Typically when I use less <filename> the file is immediately displayed. In the case of a ...
McArthey's user avatar
  • 111
1 vote
0 answers
141 views

Why does read's timeout break my console?

I have a script that is causing an issue, I've boiled it down to this; #/bin/bash read -t 1 -p 'Wanna continue?' less +F readTimeout.sh echo 'Wont get printed' The original script operated by ...
Hashbrown's user avatar
  • 3,021
1 vote
0 answers
86 views

Is it possible to have less +F with lesskey's that work without interrupt?

My situation is that I currently have some lesskeys set. And they do things fine in normal mode, but I want to have the file that I'm view also be updated. This is obviously possible with less +F, ...
question's user avatar
  • 111
1 vote
1 answer
584 views

Less in cygwin can't read file created from redirected windows cmd script

I'm running windows cmd script from windows console and redirecting output to a file by mycommand.cmd > 'filename ' 2>&1 the problem is, when I'm trying to read that file using less under ...
dhblah's user avatar
  • 153
1 vote
2 answers
1k views

utility "less" takes high cpu

I'm using suse 9 and redhat 5. Sometimes I see that "less" takes a lot of cpu. It happens more on suse 9 though happened on redhat 5 too. I have to admit that the frequency of such event is very low - ...
user avatar
0 votes
0 answers
20 views

Cygwin "less" pager: "s" command not saving text to file

According to this Q&A, less's s command should save the paged text to file. When I press s, I am asked for a log file. I provide a fill path ~/tmp/less_blah.txt, and the prompt then goes away. ...
user2153235's user avatar
  • 1,171
0 votes
0 answers
29 views

How do I make less look like a terminal to programs attached to its input?

Questions like "How do I get grep to pipe color output to less?" explain what flag to give to grep so it'll ignore the fact that less isn't a regular terminal. Is there a way to fool an ...
John Baber-Lucero's user avatar
0 votes
0 answers
22 views

In less, what's the matter with the <End> key as command?

In less I have been using the End key as a command for many years. This is in order to let less end working page by page but instead to let less make its work up to the end of the file from that ...
Anton Wessel's user avatar
0 votes
0 answers
218 views

Does `less`'s text search NOT work with huge files?

Either this is a bug, or I'm not understanding something. But I use less -p value filename.txt to search for value in filename.text and when I do it for a file that only contains a couple of lines of ...
Tim Daubenschütz's user avatar
0 votes
1 answer
351 views

Indent wrapped lines using less

Using less you can wrap long lines with -S or --chop-long-lines. Is there any way to indent those wrapped lines?
shishax's user avatar
0 votes
0 answers
604 views

Pressing q does not exit in less running in tmux

How to exit file reading mode (in less) in Linux terminal? To quit less, type q. I am using tmux on remotely connected node using ssh. I am connecting into host as follows: ssh -xt4C username@host. ...
alper's user avatar
  • 190
0 votes
1 answer
46 views

When I press up-arrow in 'less' in mintty (cygwin), only the top line changes. How do I fix this?

Here is what is happening: How do I fix this? (Just to be clear, the issue occurs when I type less <any filename>. The man less in the gif is just an arbitrary command to demonstrate the ...
Kyle's user avatar
  • 101
0 votes
0 answers
207 views

less showing ^M instead of going to a new line

I have a log file where borg --progress adds many lines separated by ^M. Weirdly, less puts the ^M in the screen "as it is", instead of producing a new line. Is there a reason for that? How can I ...
Paolo Benvenuto's user avatar
0 votes
2 answers
2k views

Less Compiler is not working in PHPStrom 2018.3

I am using PHPstrom 2018.3 (latest Version). I am getting this error while I am using less to compile through file watcher. Failed to run File Watcher ', Less'. The watcher has been disabled. Error: ...
punit shrama's user avatar
0 votes
1 answer
36 views

less +F but tracking file by name, not inode

I'm looking at log file but it's renamed (logs rotation mechanism). How do I see actual logging file in less-like fashion, so I can stop updating for a while and then continue?
George Sovetov's user avatar
0 votes
0 answers
35 views

Have pager (less) re-run git log upon keypress

Sometimes I find it handy to have the git commit graph (given by git log) displayed side-by-side to the terminal pane I'm working in. git log is run with the less pager by default and only shows the ...
jnns's user avatar
  • 241
0 votes
0 answers
21 views

Less program rendering breaks

I've been experiencing this problem on multiple computers, over a long time, but I could never find any mention of it anywhere so I thought I should ask it to understand whether it's only me once and ...
Svalorzen's user avatar
  • 113
0 votes
1 answer
685 views

Special characters in less log file make it useless

I want to save the output of the Python help command to a file. Since it uses less, the obvious way is to "s file" while in less. It works, but the words which less shows in bold are screwed up. Any ...
user755769's user avatar
0 votes
1 answer
110 views

less -S server.log (unix)

For a better understanding I prefer to read the logs with no wrap lines. In less I can get this with the -S option. The problem is that I can not select and copy rows that go beyond the right side ...
user avatar
0 votes
0 answers
159 views

Special and diacritic charactres using less, cat and other linux tools

I am using GNU bash, Version 4.1.10(4)-release (i686-pc-cygwin) and set up my .inputrc to allow for special characters and German umlauts etc.: set meta-flag on set convert-meta off set output-meta ...
Oliver's user avatar
  • 171
0 votes
0 answers
82 views

Why does `less` not recognize the mouse wheel when stdin is a pipe?

I was wondering why my less sometimes does not recognize the mouse wheel (my terminal is Konsole). Now I've found a pattern: It seems to work whenever less's STDIN comes directly from the shell (zsh ...
Stefan Majewsky's user avatar
0 votes
1 answer
504 views

Less not scrolling immediately on long lines (xterm-256color vs vt100)

When I press 'j' in a text file with long lines, it won't proceed to the next line until I've pressed j 'n' times. So if I have a file: a b c d e (long line that displays as 5 lines on screen) And ...
Nathan's user avatar
  • 1
0 votes
0 answers
151 views

mutt colorizing piped messages

Viewing messages in mutt are colorized, but piping them through the less pager removes colorization. How do I preserve message colorization? I've tried: | less -R but colorization is stripped ...
Jeffrey Bauer's user avatar
-1 votes
1 answer
52 views

Filtered file viewer

I'm using the less to view log files. This is quite good, but I want to filter out some lines from output. E.g. I don't want to see lines containing "DEBUG" or I want see lines which contain only "[...
kan's user avatar
  • 131