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.

learn more… | top users | synonyms

1
vote
1answer
11 views

How can I switch line-wrapping on and off from within less

I know I can run less -S and avoid long line wrapping. But can I switch wrapping on and off from within less?
1
vote
2answers
16 views

Why is GNU `less` just showing the output of my title script instead of the file contents?

I'm using csh as my terminal and I have a script that runs when I change directories that replaces the window title with the current directory. I have it run initially in my .cshrc file as well so ...
0
votes
0answers
30 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 ...
1
vote
2answers
101 views

Ctrl+c in a sub process is killing a nohup'ed process earlier in the script

I didn't know whether this belonged on SO (as it is a coding bug) but thought you guys would be more knowledgeable regarding the subtleties of the software used (so maybe even U&L could be ...
1
vote
0answers
16 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, ...
0
votes
0answers
37 views

Is it possible to get the scroll wheel to work in GNU less within XTerm?

In my research it sounds like less is a console only program and isn't going to be accepting mouse events any time soon. gnome-terminal appears to have an interesting feature when you're on an ...
0
votes
0answers
42 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 ...
2
votes
2answers
169 views

PHP output piped to 'less' is requiring <enter> after every command

Piping PHP output to the linux 'less' command causes 'less' to really act up. (CentOS 6.2, didn't happen with CentOS 5.) When I pipe output from php into 'less', it requires the enter key be pressed ...
1
vote
1answer
60 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 ...
0
votes
1answer
53 views

less: continue search from top

Is there an automatic way (through command line params for example) of keep searching from start of text when the end is reached? (same as Notepad++ - Continue Search from top but with less linux ...
0
votes
1answer
116 views

After running less command in -bash, instead of a prompt, I get “(END) ”. What's happening, and how do I get the prompt again?

I run the bash command "less" on a .txt. After printing out the lines in the file, the name of the file and "(END) " is printed. But I do not get a command prompt again. Other than closing the ...
0
votes
1answer
277 views

No entry for terminal type "xterm-256color-256color

I recently added the following (below) to .mycshrc to allow 256 color xterm and allow command line vim to operate in 256 colors, however certain command line tools like less have thrown errors ...
3
votes
3answers
998 views

How to copy text from less

How might one copy the entire buffer being displayed by less? No need to select specific text, I want it all. Copying to the clipboard is preferable but if we can output it to a file that works too. ...
0
votes
1answer
167 views

Setting GNU Screen to send escape codes to outer terminal on TI

I’m using GNU Screen inside mintty. To get the scroll wheel to work, I had to switch the mintty scroll wheel mode with an escape code (^[[?7787h). This has the effect that the scroll wheel does not ...
0
votes
0answers
41 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 ...
1
vote
2answers
130 views

How to use my vim configuration in less?

Quite some programs have commands that output with less(e.g. git blame filename). I would like to use my vim configuration(e.g. <C-j> instead of using Pg Down to go down a page) whenever less is ...
0
votes
2answers
96 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 - ...
1
vote
1answer
220 views

less doesn't highlight search

Something happened so I don't see less highlights any more. I've tried: using different terminal. using -g option making sure -G isn't there ^K while searching ESC-U Nothing helps. I work in ...
3
votes
2answers
188 views

How can I have `less` automatically decompress `xz` files like it did with `gz` files on my old SUSE distro?

On my old SUSE distro, less would automatically decompress .gz files. That came in very convenient when listing auto-compressed /var/log/mail*.gz files. The current version of SUSE now archives ...
3
votes
1answer
65 views

How to do a multiline search in less?

In less, can you search using / for a pattern that contains a carriage return and newline? I know your pattern can end with a line using $ (from How do I include newlines in a search in less?), but I ...
2
votes
2answers
156 views

Lessc Textmate bundle doesn't save .css file

I installed: https://github.com/appden/less.tmbundle and the lessc compiler and it seems to work (no errors) but I don't see a compiled .css file. Any ideas?
1
vote
2answers
410 views

Scroll “less” output using scroll wheel on Mac OS X

How can I enable the scrolling of "less" output (rather than the terminal window itself) using the scroll wheel on OSX?
3
votes
2answers
333 views

How do I execute a Linux command whilst using the less command or within the man pages?

I generally pipe the command ls with less and would like to execute a command while it is paging e.g. I come across a file that I would like to delete so I would like to execute the command rm ...
1
vote
1answer
134 views

Why does “ulimit -t 5” have no effect on “less” or “man”, but work on “yes”?

If I run $ ulimit -t 5 $ yes then yes gets killed after 5 seconds, but man and less/more don't. Why are those two immune to ulimit?
2
votes
3answers
1k views

Terminal pager: How to display a list in columns?

I'm sure it's very simple, but I can't remember how to tell a terminal pager (more/less/pg/most) to display a long list in columns. Since my input is just a list of short elements, displaying it the ...
1
vote
3answers
204 views

Open man-page with less [duplicate]

Possible Duplicate: How to let man utility to use less to display manual rather than more? How can i open up the Man-page for a command with the less-editor? Alternatively, how can i find ...
0
votes
1answer
168 views

How much can less utility buffer?

I'm curious. You can use less to read through a 100 GB file with no problem. But if you cat a 100 GB file into less, I'm thinking that less must buffer the whole file because there is a pipe (was it ...
6
votes
3answers
220 views

Is there an automatically scrolling, time-delayed Unix pager command?

I'd like to view output of big commands slowed down, like a slideshow with e.g. automatic, 500ms delay between each scroll. What is the simplest way to achieve this?
3
votes
1answer
123 views

Why does cd print when run in command substitution?

If I use the 'cd' BASH built-in in a command substitution, it prints extra stuff to stdout, but only when piped to, eg., less. $ echo `cd .` # The output is a single newline, appended by echo. $ ...
0
votes
1answer
68 views

equivalent to titeInhibit for Cygwin's rxvt-native?

Some programs, such as less, have the annoying idea that I should not be allowed to keep loking at the content of a file while I'm typing the next command. They save the contents of the terminal when ...
1
vote
1answer
201 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 ...
0
votes
1answer
209 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) ...
4
votes
2answers
7k views

Less or More in Windows?

Is there a command in the Windows DOS prompt that is equivalent to the UNIX less or more? Basically, the problem is that when I type hg log, the output has too many lines to fit on the screen and I ...
3
votes
2answers
382 views

The Less command can list directory contents in Gentoo Linux, but not in Ubuntu Linux

I regularly use the 'less' command in Gentoo like so: less /tmp (or any other directory, which I have access to.) Less then proceeds to show me the contents of that directory. I can also use Less to ...
3
votes
1answer
245 views

Why less -F option does not work with -S option

While trying to improve output from hg diff I've noticed that less -F option does not work with -S option. Why is that happening and how to achieve desired effect? Here is handout from man: -F or ...
3
votes
3answers
273 views

Less interrupting in less

I often pipe program output to less, e.g. produce_output | less This works great, until produce_output produces large amounts of output. If I search for some text that is deep into the file, less ...
2
votes
3answers
926 views

How can I tell kate to use CSS highlighting for .less files by default?

How can I tell kate to use CSS highlighting for .less files by default?
2
votes
1answer
129 views

vim doesn't display first line?

when I use vim to open some php files, it starts with line 2, other files display fine. When I view the file with less I have the same issue. however when I edit it with nano I can see that line's in ...
0
votes
1answer
646 views

cygwin > xterm > bash > less : MouseWheel scrolling not working

I am trying to get mousewheel scrolling to work in less, within an xterm in cygwin with XMing x-server and fvwm window manager ! I hope I make sense.. I have tried rxvt, urxvt, urxvt-X, aterm, mrxvt ...
-1
votes
1answer
39 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 ...
0
votes
1answer
218 views

less with color and locale

Using cygwin I've a problem in less: I can't see colors (for example using grep --color) and I can't set the locale I'm using (LC_ALL=C). I type this command: echo òùàòùàòà | grep --color àò | sort ...
0
votes
1answer
77 views

Hard Drive space not available when switching from Linux install back to Windows

About 6 months ago, I installed Ubuntu on my desktop onto a 2TB harddrive. After a while, I decided I would rather switch back to Windows. So I took my Win7 installation disk, popped it in and started ...
0
votes
1answer
141 views

Enable wheel in mintty for cygwin comands: less and man

I'm using mintty and cygwin. How to can I enable the mouse wheel inside less and man?
0
votes
2answers
67 views

`less` starts `ed`

I can't make less use my favorite editor. To my horror, it starts ed which I've never used and really am not going to. > echo $EDITOR emacsclient > less somefile Pressing v starts ...
1
vote
4answers
1k views

less emulate a TTY to preserve piped color output

When you pipe something through less, the program usually discards color codes because it's not outputting to a TTY. So you have to add --color=always to the options for it to work. ls -l ...
1
vote
1answer
142 views

vim -R /dev/random

I am on the verge of doing alias less='vim -R' for the convenience of being able to scroll with my multitouchpad. However, I like that less -f can view even files like /dev/random that are not ...
0
votes
3answers
1k views

“less” (linux) get/go-to X offset in file

I open a big file with this command: less +G /var/log/blah/file.log Now when I find the desired info I'd like to know its exact offset in this file, so later I can open that file again and return to ...
7
votes
1answer
939 views

How do i get the git pager to act normal?! Less leaves output on the screen when executed via git

The pager less doesn't clear the screen as it should do when i use git. I use less all the time and it usually doesn't leave output in the terminal after quit but when less gets executed via git it ...
3
votes
6answers
754 views

Linux less behavior and stderr

I'm watching the output of my complicated command with less, problem is the stderr gets lost. stderr lines normally get listed inbetween stdout lines inside less. I would like them to be printed to ...
0
votes
2answers
195 views

How can I make Unix Less wrap long columns?

I need to view a large tab delimited file using less. There is a column with ~200 characters which I am not interested in seeing but that column pushes all other columns to right making the viewing ...