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

36
votes
1answer
22k views

Less: Quickly Jump to Line Number in Large File

I'm struggling to figure out a way to do this...I'm using less to view a large (~1GB) file. I want to jump to line "$n" in the file - preferably without having to wait for lines 1-($n-1) to scroll by ...
3
votes
4answers
603 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 ...
11
votes
2answers
4k views

Mouse wheel scrolling in less and vim using urxvt

I have started working with rxvt-unicode (aka urxvt) but found an issue with mouse-wheel scrolling, as compared to gnome-terminal and konsole. The mouse wheel works fine for going through the ...
55
votes
10answers
18k views

How to syntax highlight via Less

is there a way to syntax highlight a file I see in Less? actually I'm using this command to open an xml file (and sometimes a series of them) less htmleditors/htmleditors_config.xml or less ...
73
votes
3answers
19k views

less command with multiple files: How to navigate to next/previous

I just found out I can use less with multiple files. less status line tells me (END) - Next: file2.txt But how do I navigate previous/next from less?
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 ...
95
votes
5answers
20k views

Less and Grep: Getting colored results when using a pipe from grep to less

I use the --colour option of grep a lot, but I often use less as well. How can I pipe grep results to less and still preserve the coloring. (Or is that possible?) grep "search-string" -R * --colour | ...