Less -q or –quiet or –silent option causes moderately “quiet” operation: the terminal bell is not rung if an attempt is made to scroll past the end of the file or before the beginning of the file. If the terminal has a “visual bell”, it is used instead. The bell will be rung on certain other errors, such as typing an invalid character. The default is to ring the terminal bell in all such cases.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
## create a long file with 200 lines > myfile; i=1; while [ $i -le 200 ]; \ do echo "$i" >> myfile; ((i++)); done ## default less myfile ## in the interactive mode, type a (rings bell) ## hit space bar to scroll to the end of file ## rings bell once end is reached ## less -q or --quiet or --silent option less -q myfile ## in the interactive mode, type a (rings bell) ## hit space bar to scroll to the end of file ## does not rings bell once end is reached rm myfile |