Re: less
*- On 12 Aug, Patrick wrote about "Re: less"
> On Thu, Aug 12, 1999 at 03:11:32PM -0400, Wakko Warner took time to write:
>> Every time I go to less a file that might be a binary (to less), it asks if
>> I want to view it. This has gotten very annoying and I haven't seen how to
>> turn this off. I want to turn it off.
>
> man less says :
> -f Forces non-regular files to be opened. (A non-reg
> ular file is a directory or a device special file.)
> Also suppresses the warning message when a binary
> file is opened. By default, less will refuse to
> open non-regular files.
>
> that should do it...
> create an alias for easier use, like (in bash)
> alias less='less -f' (in your ~/.bash_profile)
>
Comming in late on this after a short vacation.
Probably a more proper way would be to set the LESS environment variable
to include the -f flag. You can do this in your system wide or
personal shell init files.
>From the less man page:
Options are also taken from the environment variable
"LESS". For example, to avoid typing "less -options ..."
each time less is invoked, you might tell csh:
setenv LESS "-options"
or if you use sh:
LESS="-options"; export LESS
--
Brian
---------------------------------------------------------------------
Mechanical Engineering servis@purdue.edu
Purdue University http://www.ecn.purdue.edu/~servis
---------------------------------------------------------------------
Reply to:
- References:
- Re: less
- From: Patrick <pat@patoche.org>