Questions tagged [less]

27 questions
1
vote
1 answer

How to set LESSCHARSET system wide?

This is a follow up on How to make the 'less' command handle UTF-8? If I want to set options for less globally, so that each user doesn't have to fiddle with their own env vars (.basrc, etc) individually, where should it be set? /etc/bashrc is not a…
gcb
  • 344
  • 1
  • 4
  • 18
1
vote
1 answer

Unable to understand a line of Less_termcap

This problem is related to the thread. The line in my .zshrc export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking The following seems to mean \$ starts the expression ' -- ' says everything in the brackets matters \E apparently says that…
0
votes
0 answers

How to open multiple log files with less and logrotate?

I use logrotate for nginx and php logs. By default it names files like: access.log access.log.1 access.log.2.gz ... access.log.10.gz I want to open all of the log files in less so I can search across them all etc. The problem is the naming scheme…
Mark Robinson
  • 217
  • 2
  • 3
  • 10
0
votes
0 answers

*searching* for color changes in less

I have less already displaying colored output (e.g. from Vagrant or Packer) by having the LESS environment variable set to -R. What I'd like to be able to do now is to search for specific colors, e.g. ESC[1;31m for red. I tried various combinations…
Capt. Crunch
  • 839
  • 2
  • 12
  • 25
0
votes
0 answers

less doesn't work in LXC container

I'm experiencing some trouble running less and expect inside LXC container (whether using console or SSH) Expect won't work before I won't add an "interact" anywhere in the script, and less doesn't show any output, and exits with status 1…
aqz
  • 1
0
votes
1 answer

Following a file mixed with grep to exclude lines

Basically I want to combine the function whereby you can Less a file and then Shift+F to follow the file, as you would do with Apache's access.log. However I would like the output to ignore/hide certain lines such as lines with .jpg in or lines…
DanH
  • 827
  • 2
  • 9
  • 26
0
votes
1 answer

How do you jump to a particular line when using less from the command line?

I want something like: less -j 4567 file.txt
James
  • 113
  • 1
  • 3
0
votes
1 answer

MySQL client 8.0 showing "fwrite: Broken pipe" on large query when using a pager

I have always been using a pager (--pager="less -SFX" to be more specific) for MySQL client. Previously I was on version 5.6 of MySQL client/server and it was doing great. Recently I started to use MySQL client/server version 8.0, and the client…
goodbyeera
  • 59
  • 6
0
votes
0 answers

less gives a bunch of files opened

I tried to open a file using less: less /home/me/Desktop/file1 This is returning unexpected result like this: /usr/bin/less: 1: [: missing ] At least one file or directory argument required. Use --help to show usage. 7-Zip [64] 16.02 : Copyright…
0
votes
0 answers

Is there any way to "stop following" in less without pressing Ctrl+C?

If I pipe the output of a long-running command to less, for example: foreman start | less -SR And I now press F to follow the output of foreman, is there any way to tell less to stop following, without pressing CtrlC? Because that will also send…
Hubro
  • 1,138
  • 4
  • 16
  • 35
-1
votes
1 answer

Bash script ctrl+c error

I have log file system that renames the latest log file with current time and i must set a less command to check log file easily. I can quit less sommand with q but i must follow the latest incoming lines so after pressing shift+f q doesnt work and…
-1
votes
1 answer

Overwrote less command, how do I reinstall it?

I was trying to use the following command to pipe the results to less so that I could read a listing fully: ls -lh | less This, according to various sources pipe the contents to less and allow viewing the listing in a new file. Instead, though, it…
Exit
  • 141
  • 1
  • 1
  • 9
1
2