1
vote
1answer
24 views

Less - Select to clipboard

In Less (Linux terminal), I can select lines with the mouse and then use Ctrl+Shift+C to copy to the clipboard. This only works within the displayed part of the terminal. How can I select more text? ...
0
votes
2answers
31 views

How do I view the content of a very large file at position in Linux?

I've got a file containing JSON data that is about 90MB of size and has one line. I need to go to position 99376229. Unfortunately vim and less both crash when I try moving to that column. How can I ...
0
votes
2answers
79 views

“Less” prompts for “binary file” display when colors in output

We've recently enabled colouring the log files of a few services, I believe we use ANSI escape sequences for that. Looks like this: [2014-06-12 10:56:43,214] [main] [VOID] ESC[34mINFO ESC[0;39m ...
0
votes
1answer
29 views

Can less wrap lines like fmt does?

Like most people I use less as my terminal pager. Occasionally I view files consisting of very long lines of plain or marked-up text. By default less folds these lines at the terminal window edge. ...
0
votes
0answers
27 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 ...
3
votes
2answers
434 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 ...
0
votes
0answers
60 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 ...
3
votes
3answers
2k 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. ...
1
vote
2answers
158 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
121 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 - ...
3
votes
2answers
253 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
2answers
437 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
164 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?
0
votes
1answer
214 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 ...
1
vote
1answer
237 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 ...
3
votes
1answer
291 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 ...
2
votes
3answers
1k 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?
-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
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 ...
43
votes
3answers
13k views

less is more? Is more less? I'm so confused

When I first heard their names, I got really confused when I tried to guess what these tools might do, I thought I'd misheard something. What's the difference between more and less, i.e. why ...
6
votes
3answers
1k views

How do you search for tabs in the linux command less?

How do you search for tabs in the linux command less? I've tried /\t but that only seems to search for the character t.
114
votes
3answers
26k views

How to turn off word-wrap in less

Short version: How can I make the less utility in Linux not wrap lines? Long version: Often I need to view huge CSV files using less with hundreds of columns. I frequently only care about the first ...
0
votes
1answer
207 views

Preventing the pager less from exiting when scrolling beyond the end of file

I like less and use it as my default pager in Linux. However, there are times that I am scrolling down through a large document quickly and less exits when I reach the end of the document before I ...
4
votes
1answer
206 views

Less hotkeys not working, printing keycodes instead performing action

When I try something like php -i | less Less is not responding to hotkeys, but prints them like pressing "q" results in statusline :q PageDown :^[[6~ Pressing ENTER like "executes" the ...
2
votes
1answer
497 views

less tail mode + pipes?

Why doesn't less's tail/scroll mode work with pipes? For example, I'd like to make a build script pipe to less in order to make the output of the build script scrollable. So... make | less +F ...
7
votes
1answer
269 views

Getting LESS to return back to command line if a short file is displayed

Is there a command line option that will allow less to return to the command line if there are not sufficient lines in the file to warrant paging. Sure I have seen it in the past but can't find the ...
3
votes
4answers
4k views

How do you run `less` and have it run a search pattern automatically?

I'm trying to run less in Linux, and I want it to search for something immediately after launch. It's basically like doing this: $ less Then press '/', type a search pattern like "^commit \w+$", ...
1
vote
7answers
293 views

How can I get file information in 'less' like with 'man'?

When I view a file in Linux with the 'less' command, I often only get a ":" prompt in the bottom left corner. There's no clue about how long the file will be, or at which location I am currently. When ...
1
vote
3answers
2k views

Use `less` pager on file with non-standard encoding

I often use the less pager to view logfiles. Usually I use less -F to follow the progress of the log à la tail. However, some logfiles use national characters in a non-standard encoding (Latin-1, ...
1
vote
1answer
252 views

less -Sr colourful.log How to view colourful log in less?

Both less -r (preserve terminal control sequences) and less -S (chop long lines) work well alone. But using them together breaks things. It chops too late and it wrecks the next line. Reducing ...
82
votes
10answers
37k views

Get colors in 'less'' command

when I read a file in Linux with the command 'less' or 'more', how can I get the content in colors?
4
votes
3answers
517 views

Incremental searching with the `less` utility

Does less have an incremental search? I'm on xubuntu.
3
votes
4answers
598 views

Unix command to empty logfile from within “less”?

I prefer using "less" to reading logfiles. As opposed to "tail -f" I can both follow (Shift + F), stop (Ctrl + C), and navigate up and down u and d, etc. Now what I really would like is the ability ...
9
votes
3answers
2k views

Why does less tail mode stop working?

Using the less command on linux in tail mode (F command or less -f) consistently stops working on certain machines and/or certain files. New changes simply stop showing up. I know I've fixed this ...